Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open new tabs in the current Firefox container #182

Open
Nerixyz opened this issue Apr 1, 2022 · 2 comments
Open

Open new tabs in the current Firefox container #182

Nerixyz opened this issue Apr 1, 2022 · 2 comments

Comments

@Nerixyz
Copy link

Nerixyz commented Apr 1, 2022

System

  • OS name: Windows
  • OS version: 10
  • Browser name: Firefox
  • Browser version: 100.0a1
  • Extension version: 4.7.0

Bug description

When searching for an image from a container-tab in Firefox through the context menu, the opened tab isn't opened in the container but in the "root" container (i.e. no container). This is because the tab created by searchEngine doesn't include the openerTabId.

Patch

Since this project doesn't allow PRs (?!), I'm posting the diff here. It's two lines that need to be edited in src/background/main.js.

diff --git a/src/background/main.js b/src/background/main.js
index 7f93be8..7cc80dd 100644
--- a/src/background/main.js
+++ b/src/background/main.js
@@ -503,7 +503,8 @@ async function searchEngine(session, search, image, imageId, tabActive) {
   const tab = await createTab({
     token,
     index: session.sourceTabIndex,
-    active: tabActive
+    active: tabActive,
+    openerTabId: session.sourceTabId,
   });
   const tabId = tab.id;
@dessant
Copy link
Owner

dessant commented Apr 1, 2022

I've seen some bugs after openerTabId was added to Web Archives, and ended up removing it for the time being. One I remember was with Firefox and regular tabs: when you were searching on multiple engines at once and closed the tab of a search result, the focus would jump to the openerTabId tab instead of the next tab in the tab strip. An attempt was made to chain openerTabId among search results, but that of course also resulted in the active tab jumping around if the tabs were rearranged before closing.

I'll give it another go at some point, but it will take considerable time despite the small change, because we have to test a bunch of platforms and use cases.

@dessant dessant changed the title Search Queries in Firefox Don’t Respect Their Container (Created Tabs Don’t Include Their Opener) Open new tabs in the current Firefox container Apr 5, 2022
@toiletbowlkuku
Copy link

Wouldn't the issue of the tab focus jumping around be a minor annoyance compared to the lost functionality of having the extension respect tab containers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants