Skip to content

Fix #2069 - #2916

Open
janw-me wants to merge 1 commit into
mozilla:mainfrom
janw-me:main
Open

Fix #2069#2916
janw-me wants to merge 1 commit into
mozilla:mainfrom
janw-me:main

Conversation

@janw-me

@janw-me janw-me commented Jul 15, 2026

Copy link
Copy Markdown

Before submitting your pull request

  • I agree to license my code under the MPL 2.0 license.
  • I rebased my work on top of the main branch.
  • I ran npm test and all tests passed.
  • I added test coverages if relevant.

Description

Fix the behaviour of #2069
Custom new tabs/home urls will now close when a clicked link is opened in a container.

AI-notice

I fully created this change with Claude.
And I have reviewed the code but Javascript is not the area of expertise.
Also I have tested the code with a new profile in an actual FF browser (152.0.4).
I have fully included me -a human- in the loop.

As far as I could find there is no AI policy.
If this is not allowed or appreciated feel free to close this PR, and my apologies.

Type of change

Select all that apply.

  • Bug fix
  • New feature
  • Major change (fix or feature that would cause existing functionality to work differently than in the current version)

Tag issues related to this pull request:

…in container

Previously, reopening a container-assigned site only replaced the current
tab when it was one of a hardcoded set of built-in "new tab" pages
(about:newtab, about:home, etc.). A custom homepage or a new-tab-page
replacement extension left an extra tab behind instead of being replaced,
since neither matched that static list.

isNewTabPage() now also checks the browser's actual homepage/new-tab-page
override (via the new browserSettings permission), so it recognizes
whatever page the browser or another extension currently treats as the
homepage/new-tab page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant