Open Bug 1808022 Opened 3 years ago Updated 2 years ago

Firefox reopens the last session even when manually closed

Categories

(Firefox :: Session Restore, enhancement)

Firefox 109
enhancement

Tracking

()

People

(Reporter: felixsoetewey, Unassigned)

Details

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

Steps to reproduce:

I opened Firefox on one windows desktop, closed it, and then opened it again on another desktop. But it works as expected if I try opening it a second time.

Actual results:

Firefox opened on the first desktop.

Expected results:

Firefox opens in the desktop I am currently using.

Component: Untriaged → Window Management
Product: Firefox → Core
Component: Window Management → Widget: Win32

This is probably because Session Restore is enabled, and it's reopening the Firefox window on the desktop it was last on because that's part of the window state.

Does this behavior persist if you go to about:preferences and uncheck Open previous windows and tabs (under Startup)?

This indeed only occurs if session restore is on, but it still does that when all tabs are closed or when I click history>restore previous session.

(In reply to felixsoetewey from comment #2)

but it still does that when all tabs are closed or when I click history>restore previous session.
Note: the other ways it can occur still is only when Session Restore is on.

(In reply to felixsoetewey from comment #2)

when I click history>restore previous session

This is intended behavior — Firefox should definitely restore windows to the virtual desktops they were on if it's explicitly asked to restore.

when all tabs are closed

This, on the other hand, arguably shouldn't happen: if the last tab/window is manually closed, that should probably trigger the next restart to start a fresh session. If the user actually closed that tab/window by accident, they can restore it via the History menu. (Or possibly whether to do that should be configurable via an about:config preference? I can see it either way...)

That doesn't have anything to do with Windows virtual desktops, though. Forwarding to Session Restore (with some emendations) for consideration there.

Component: Widget: Win32 → Session Restore
Product: Core → Firefox
Summary: firefox opens in the wrong desktop → Firefox reopens the last session even when manually closed

I will set this enhancement as new so the engineering team could decide if they take in consideration changing this.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Hi, just want to clarify a few things - first, is this still happening? Secondly, I want to confirm you're using the same profile for each "desktop" and when you say anotherdesktop, is it another desktop/device or a virtual desktop (its unclear to me from other comments). Additionally, how are you closing Firefox each time (please be specific, this is an important detail)?

Flags: needinfo?(felixsoetewey)

(In reply to Sarah Clements [:sclements] from comment #6)

first, is this still happening?
Yes, but only if I use session restore.
Secondly, I want to confirm you're using the same profile for each "desktop"
I only use one profile for all my firefox browsers, so yes.
when you say another desktop, is it another desktop/device or a virtual desktop (its unclear to me from other comments).
It is a virtual desktop.
Additionally, how are you closing Firefox each time (please be specific, this is an important detail)?
Just with the cross that closes the window in the top right corner.

Flags: needinfo?(felixsoetewey)
You need to log in before you can comment on or make changes to this bug.