Closed
Bug 492383
Opened 17 years ago
Closed 6 years ago
Should not restore last tab when close last tab by File>Close Tab(ctrl+w) under condition of browser.tabs.closeWindowWithLastTab=true
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
DUPLICATE
of bug 490136
People
(Reporter: alice0775, Unassigned)
References
Details
(Keywords: parity-chrome)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090511 Firefox/3.5.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090511 Minefield/3.6a1pre ID:20090511042228
Should not restore last tab when close last tab by File>Close Tab(ctrl+w).
Because it closes a tab in the last session, it is not rational that the tab is restored when I rebooted.
Reproducible: Always
Steps to Reproduce:
1.Start Minefield with new profile
2.Set browser.tabs.closeWindowWithLastTab=true
3.Set browser.startup.page=3
4.Navigate Some URL
5.Confirm there is only one tab
6.File>Close Tab(ctrl+w)
7.Start Minefield again
Actual Results:
Restored last tab.
Expected Results:
Should not restore last tab.
Should be blank tab.
Because it closes a tab in the last session, it is not rational that the tab is restored when I rebooted.
Branch also has a same issue.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090511 Shiretoko/3.5b5pre ID:20090511045623
Restoring last tab is ok when File>Close window(Ctrl+Shift+w).
After a command to close window, it is logical to restore last tab.
| Reporter | ||
Updated•17 years ago
|
Component: General → Tabbed Browser
Version: unspecified → Trunk
Comment 1•17 years ago
|
||
Has this to do with the following lines in tabbrowser.xml?
1529 // Closing the tab and replacing it with a blank one is notably slower
1530 // than closing the window right away. If the caller opts in, take
1531 // the fast path.
1532 if (closeWindow &&
1533 aCloseWindowFastpath &&
1534 this._removingTabs.length == 0 &&
1535 (this._windowIsClosing = window.closeWindow(true)))
1536 return null;
I think the tab should really be closed before closing the window, instead of fastpathing this...
Comment 2•17 years ago
|
||
The issue here seems to be that intended effect of closing the last tab without closing the window is unclear. The last tab doesn't have a close button, so it looks like one cannot close the last tab, but pressing CtrlW closes the tab, replacing it with an empty tab (about:blank).
Either 'close' is possible on last tab, resulting in an empty tab (then the close button should be visible as long as it is not empty, and CtrlW should only be active when tab is not empty).
Or 'Close' should not be possible at all on last tab, which means there is no way to clear the last tab. So close must be possible on last tab (as long as it is not empty).
P.s. close on last tab in popup should close the popup window anyway, so also Ctrl-W on popup should be able to close the window (see bug 484315).
Comment 3•17 years ago
|
||
The close last tab action takes a 'fastpath' when closing the last tab, by not closing the tab itself before closing the window. This causes FF to remember the current open tab on the close of FF.
While Close Window should remember current state for next reopening of FF (with the right settings for this), doing Close Tab on the last tab (with CloseWindowWithLastTab = true) should not restore the last page.
Updated•17 years ago
|
QA Contact: general → tabbed.browser
Updated•16 years ago
|
Blocks: cuts-cruft
Updated•16 years ago
|
No longer blocks: cuts-cruft
Updated•16 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•16 years ago
|
||
IMHO, in this firefox should show the homepage, as it does for new windows
Comment 6•15 years ago
|
||
Verified on:
Mozilla/5.0 (Windows NT 5.1; rv:10.0a1) Gecko/20111002 Firefox/10.0a1
Mozilla/5.0 (X11; Linux x86_64; rv:10.0a1) Gecko/20111002 Firefox/10.0a1
and this bug is no longer reproducible.
1. Launch Firefox.
2. Make sure only one tab is open and load a web page in it (not the homepage).
3. Press Ctrl+W.
4. Restart Firefox.
The homepage is opened, not the page loaded at step2.
| Reporter | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INCOMPLETE
Comment 7•9 years ago
|
||
I guess the bug's back again. I have been seeing this for a long time in both Windows and GNU/Linux.
User agent for GNU/Linux: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Status: RESOLVED → UNCONFIRMED
Ever confirmed: false
Resolution: INCOMPLETE → ---
Updated•9 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 8•8 years ago
|
||
I can confirm this issue with Firefox 62.0.3.
Can we at least establish that it is unexpected behaviour, thus a bug?
I don't know if it is a regression, because I cannot find the resolution in this bug report.
The "Resolution" was marked "INCOMPLETE".
Comment 10•7 years ago
|
||
As a work-around, go to about:config, and set browser.tabs.closeWindowWithLastTab to *false*. The consequence is that if you now press Ctrl-W when only one tab is open, Firefox will show your homepage (or an empty page) instead of closing the whole web browser. You will always need to press Ctrl-Q (additionally) to close the web browser.
Then this bug does not apply anymore (except in the anal sense that it will probably reload your homepage when opening the browser again).
Of course, you need to like the idea that the web browser does not quit when you close the last tab. I came to like this behaviour—it actually gives a quite consistent feel.
To be clear, this does not mean this bug is solved.
Comment 11•7 years ago
|
||
I wouldn't consider that to be a work-around, because when Firefox is relaunched from an external program with a url passed as an argument, a blank tab still opens before the argument url in a second tab.
Side note: I don't *mind* having closeWindowWithLastTab disabled. In fact I would prefer it that way *IF* two other specific features were implemented: In Opera Presto I was able to set a single keyboard shortcut that would close the current tab, and if there were no tabs open it would minimize to the system tray. For Firefox to achieve this, first the program would have to be able to actually *close* the last tab and allow a tab-less window, and second it would have to be able to support much smarter keyboard shortcuts.
Updated•7 years ago
|
Component: Tabbed Browser → Session Restore
OS: Windows XP → All
Hardware: x86 → All
Updated•6 years ago
|
Keywords: parity-chrome
Updated•6 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago → 6 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•