Skip to content

Firefox: Open new tabs in the same container - #9517

Closed
fregante with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-unread-anywhere-firefox-container
Closed

fregante with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-unread-anywhere-firefox-container

Conversation

Copilot AI commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Copilot AI changed the title [WIP] Fix unread-anywhere to inherit container in Firefox Preserve Firefox container when unread-anywhere opens tabs May 18, 2026
Copilot AI requested a review from fregante May 18, 2026 16:38
@github-actions github-actions Bot added the bug label May 18, 2026
@fregante fregante changed the title Preserve Firefox container when unread-anywhere opens tabs Firefox: Open new tabs in the same container May 18, 2026
@fregante fregante added enhancement firefox Related to Firefox only and removed bug labels May 18, 2026
@github-actions github-actions Bot added the bug label May 18, 2026

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incredibly, it works! I'm kinda surprised that the order appears to be correct too

@fregante
fregante marked this pull request as ready for review May 18, 2026 16:59
Comment thread source/background.ts
Comment on lines +35 to +44
if (isFirefox()) {
// Duplicate tab so that the container is preserved.
// Doing it via .create is a PITA: https://github.com/refined-github/refined-github/pull/8786#pullrequestreview-3491531965
const duplicatedTab = await chrome.tabs.duplicate(tab.id!, {
// @ts-expect-error - Firefox only https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/duplicate#active
active: false,
}) as unknown as chrome.tabs.Tab;
await chrome.tabs.update(duplicatedTab.id, {url});
return;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hq720

@fregante

Copy link
Copy Markdown
Member

No freaking way... I just remembered..

@fregante fregante closed this May 18, 2026
@fregante
fregante deleted the copilot/fix-unread-anywhere-firefox-container branch May 18, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug enhancement firefox Related to Firefox only

Development

Successfully merging this pull request may close these issues.

unread-anywhere should inherit the container in Firefox

2 participants