Fix prevent session loss when library is closed after main window (#11073)#11129
Conversation
- Added check to skip session save from non-browser windows - Added test to verify Library window doesn't clear session - Fixes issue where closing Library window last loses tabs
Signed-off-by: Radless0 <54997703+Radless0@users.noreply.github.com>
|
Would it also be interesting to also ignore private windows? |
As far as I know, private windows are already excluded from session restore by design, so I think it’s unnecessary to handle them here as well. |
|
I dont understand the patch then, because this check for "navigator:browser", isn't it done before by checking if __Ssi exists on the window's attributes? |
In Zen, private windows are handled as a completely separate process (Zen Private Browsing), so they don’t interact with the main session store at all, that’s why I didn’t include them in this patch. As for the navigator:browser check in Zen, secondary windows like the Library still run inside the main process and may still expose session-related attributes such as __Ssi. That’s why the extra navigator:browser check is needed: it ensures only real browser windows affect the session state when closing. |
|
Wouldn't it be more interesting to submit this patch to upstream firefox? |
|
This should've been fixed with window sync, but thanks for showing interest! |
Closing the Library window after the main window used to clear the session state completely; this patch ensures session save is skipped for non-browser windows and adds a test to cover this scenario.
Fix: #11073