Skip to content

Commit 7841aab

Browse files
authored
Merge pull request #83 from alexbarrett/firefox-popup-fix
Firefox popup blocker preventing new tab
2 parents 497d8a1 + f150315 commit 7841aab

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ Object.assign(extension, {
7070
});
7171
this.register(options.navigateNewTabKey, () => {
7272
const link = results.items[results.focusedIndex];
73-
// NOTE: Firefox (tested in 58) somehow from single window.open() opened
74-
// a link twice. Using timeout solves the issue.
75-
window.setTimeout(() => window.open(link.anchor.href));
73+
browser.runtime.sendMessage({type: 'tabsCreate', options: {url: link.anchor.href, active: true}});
7674
});
7775
this.register(options.navigateNewTabBackgroundKey, () => {
7876
const link = results.items[results.focusedIndex];

0 commit comments

Comments
 (0)