Sidebar is unexpectedly visible in a popup window with a profile migrated from old versions
Categories
(Firefox :: Sidebar, defect, P2)
Tracking
()
People
(Reporter: yuki, Assigned: sfoster)
References
Details
(Whiteboard: [fidefe-sidebar])
The element #sidebar-box
can have persistent checked
attribute which was saved by an old version Firefox, and it triggers unexpectedly visible sidebar in popup windows on new versions of Firefox.
Steps to reproduce
- Install Firefox ESR115 to
C:\Program Files\Mozilla Firefox ESR115
. - Install Nightly to
C:\Program Files\Firefox Nightly
. - Create a blank folder at
%temp%\temporary-profile
. - Start Firefox ESR115 with the blank folder as its profile:
"C:\Program Files\Mozilla Firefox ESR115\firefox.exe" -profile "%temp%\temporary-profile"
- Hit Ctrl-B to show the bookmarks sidebar.
- Exit Firefox ESR115.
- Start Nightly with the profile initialized by Firefox ESR115:
"C:\Program Files\Firefox Nightly\firefox.exe" -profile "%temp%\temporary-profile"
- Go to
about:preferences#experimental
- Check to "Sidebar" to activate new style sidebar.
- Go to https://javascript.info/popup-windows#example-a-minimalistic-window
- Click the "play" button on the second testcase which opens 600x300 popup window with params
scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=600,height=300,left=100,top=100
.
Expected result
- A popup window is opened with no sidebar.
Actual result
- A popup window is opened with visible sidebar.
Environment
- Firefox Nightly 135.0a1 (Build ID: 20241209213901)
Reporter | ||
Comment 1•2 months ago
|
||
The "checked" attribute was saved by SidebarUI.uninit()
.
https://searchfox.org/mozilla-esr115/rev/62894581b8b26d2fb0b2565791aa7c7a25dec3dd/browser/base/content/browser-sidebar.js#140
SidebarController.uninit()
in Nightly has no such operation.
https://searchfox.org/mozilla-central/rev/e6733c6143dc6a1bd32c9c65d685528deb1ba895/browser/components/sidebar/browser-sidebar.js#436
And, wasOpen
at this line becomes true
if the "checked" is restored from xulstore.json. It shows the #sidebar-main
always even if it is apopup window.
https://searchfox.org/mozilla-central/rev/e6733c6143dc6a1bd32c9c65d685528deb1ba895/browser/components/sidebar/browser-sidebar.js#811
Assignee | ||
Comment 2•2 months ago
|
||
Thanks for filing this and tracking down the culprit. While we should avoid writing nonsense into the saved session, we should expect and handle nonsense regardless when restoring a session. So adding a are-we-a-popup-window check there in startDelayedLoad
seems prudent.
Updated•2 months ago
|
Updated•29 days ago
|
Assignee | ||
Comment 3•1 day ago
|
||
As suspected, this seems to have been fixed by bug 1942314, whose patch includes a bunch of checks to ensure we avoid saving sidebar state for a popup window, and avoid showing either the sidebar launcher or panel for a popup window.
Assignee | ||
Comment 4•1 day ago
|
||
[Tracking Requested - why for this release]:
We can expect something similar to this scenario to occur on update to 136. Once the patch on bug 1942314 is uplifted, it would be good to also verify this bug is fixed.
Updated•13 hours ago
|
Description
•