Tab discarded via browser.tabs.discard API visually still display as loaded.
Categories
(Firefox :: Session Restore, defect, P3)
Tracking
()
People
(Reporter: mk.eesti+bugzilla, Unassigned)
References
Details
(Keywords: blocked-ux)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0
Steps to reproduce:
Tab discarded by addons via browser.tabs.discard API visually still display as loaded in the default Firefox UI.
Similarly, when browser is just started and previous session is restored, all tabs are displayed as loaded, even though they are all discarded.
This issue only happens in native Firefox UI, the addons that display their own tabs have no problem reacting to tabs being programmatically discarded (or already discarded on browser startup) and visually changing their display.
Versions tested:
Windows 151.0.2 (64-bit)
Windows 152.0.4 (64-bit)
Windows 152.0.5 (64-bit)
Actual results:
Tabs discarded via browser.tabs.discard API or loaded from a pervious session as already discarded visually still display as loaded in the default Firefox UI.
Expected results:
Tabs discarded via browser.tabs.discard API or loaded from a pervious session as already discarded visually should display as discarded, to differentiate them from loaded tabs.
Comment 1•4 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Session Restore' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•4 months ago
|
Can you please let me know what extension was used for reproducing this issue?
You can reproduce it with literally any extension, even an empty one,
by just issuing a direct discard command to tabs via console.
- Load any extension via about:debugging as a temporary extension
- Use 'Inspect' for it to open the console
- Use this command:
browser.tabs.query({ active: false }).then(tabs => { const ids = tabs.map(t => t.id); browser.tabs.discard(ids).then(() => { console.log(Discarded ${ids.length} tabs.); }); });
To discard all tabs besides the active one. - Observe that there is no changes in tab appearance, despite them being discarded.
To confirm that the tab is actually discarded (since FF doesn't show it in any way) without activating it,
hover over it - if preview is empty, its discarded.
browser.tabs.query({ active: false }).then(tabs => {
const ids = tabs.map(t => t.id);
browser.tabs.discard(ids).then(() => {
console.log(`Discarded ${ids.length} tabs.`);
});
});
Formatting above mangled the code, here is the correct version.
Thank you . I am now able to confirm the issue and I will mark it as new.
Updated•4 months ago
|
Updated•4 months ago
|
Updated•1 month ago
|
Description
•