Closed Bug 1761635 Opened 2 years ago Closed 2 years ago

switchToTabHavingURI.switchIfURIInWindow should take into account that adoptTab can abort

Categories

(Firefox :: Tabbed Browser, defect)

defect

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

  1. Set browser.urlbar.switchTabs.adoptIntoActiveWindow = true

  2. Make sure you don't have any about:preferences tab

  3. Open browser console and run

    gBrowser.addTab("about:preferences", {
      createLazyBrowser: true,
      triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
      allowInheritPrincipal: true,
    })
    
  4. Open a new window. Open a 2nd tab in it

  5. Type about:preferences % in the location bar, choose the entry from the list that says "Switch to Tab".

Then, Firefox tries to adopt the tab into the new window. But this fails due to bug 1758307.

Then, what happens is that the tab closes, but you are still in the new window, not seeing the about:preferences tab anywhere.

I think that if the adoption fails, Firefox should fall back to behaving like with browser.urlbar.switchTabs.adoptIntoActiveWindow = false

Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/b7bac8f61e16
Make switchToTabHavingURI handle adoptTab failures. r=Gijs

The severity field is not set for this bug.
:dao, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dao+bmo)
Severity: -- → N/A
Flags: needinfo?(dao+bmo)
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: