Open Bug 1511756 Opened 11 months ago Updated 16 days ago

A reload on a discarded tab often causes the tab title to be incorrect.

Categories

(Firefox :: Tabbed Browser, defect, P3)

64 Branch
defect

Tracking

()

Tracking Status
firefox65 --- affected

People

(Reporter: anonymous30901032, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0

Steps to reproduce:

1) Install Tab Unloader extension.
2) Open about 5-10 new tabs with different URLs.
3) Discard those tabs with Tab Unloader (right click on a web page to access it).
4) Right click on discarded tabs without selecting them and click 'Reload Tab' or do a reload all tabs though the menu.

The title of the discarded tabs that were reloaded is often a part of the tab's URL, not the title that was previously showing.
I've tested with the following Add-ons on Noghtly65.0a1 Windos10.
And I can reproduce the issue.
https://addons.mozilla.org/en-US/firefox/addon/auto-tab-discard
https://addons.mozilla.org/en-US/firefox/addon/unload-tabs/
https://addons.mozilla.org/en-US/firefox/addon/tab-unloader-we

Reproducible: always

Steps To Reproduce:
1. Install one of the above addon or similar addon
2. Open https://www.wikipedia.org/ in background tab
   --- observe, tab title is "Wikipedia" as expected
3. Right click on the tab and perform Unload / Discard tab
4. Right click on the tab and perform Reload tab
   --- observe, tab title becomes "wikipedia.org/" BUG!

Actual Results:
Tab title will be corrupted.

Expected Results:
The tab title should be set correctly.
Status: UNCONFIRMED → NEW
Component: Untriaged → Tabbed Browser
Ever confirmed: true
Blocks: lazytabs
Priority: -- → P3
See Also: → 1488094
No longer blocks: lazytabs

To test this without add-ons:

var tab = gBrowser.addTab('http://example.com/', {
  createLazyBrowser: true,
  lazyTabTitle: "foobar",
  triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
  allowInheritPrincipal: true,
});
console.log("Title before reload:", tab.label);
gBrowser.addTabsProgressListener({
  onLocationChange(aBrowser, aWebProgress, aRequest, aLocation, aFlags) {
    if (aBrowser === tab.linkedBrowser) {
      gBrowser.removeTabsProgressListener(this);
      console.log("Title after reload:", tab.label);
    }
  },
});
gBrowser.reloadTab(tab);

Result:

Title before reload: foobar
Title after reload: example.com/

It should be Example Domain after the reload.

See Also: 14880941498432, 1528895, 1522184
You need to log in before you can comment on or make changes to this bug.