Closed Bug 484315 Opened 17 years ago Closed 16 years ago

With browser.tabs.closeWindowWithLastTab set to false popups cannot be closed

Categories

(Firefox :: Tabbed Browser, defect)

3.5 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3.7a1
Tracking Status
status1.9.2 --- beta4-fixed

People

(Reporter: whimboo, Assigned: dao)

References

(Blocks 1 open bug, )

Details

(Keywords: regression, verified1.9.2)

Attachments

(1 file, 5 obsolete files)

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre) Gecko/20090316 Shiretoko/3.1b4pre ID:20090316030927 With the implementation of the hidden pref to prevent the closing of the window when the last tab is closed with Cmd/Ctrl+W, there is no way to close a popup while using the keyboard. This seems to be OS X only. As given in the menu the shortcut should be Shift+Cmd+W but it only ends into a beep. But the window is not closed. The user has to use the mouse to get rid of the popup.
Steps: 1. Load http://www.popuptest.com/popuptest1.html 2. Open one of these popups 3. Hit Cmd+W to close the tab => window stays open 4. Hit Shift+Cmd+W => window stays open It seems like that the focus get lost and the event is not handled. Using the tab key to switch to the content area and press Shift+Cmd+W then, it will close the window.
OS: Mac OS X → All
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #368540 - Flags: review?(gavin.sharp)
I think !win.document.documentElement.getAttribute("chromehidden") is a better "is a popup" test. This change to ignore the pref for popups might make sense, but isn't the real bug the fact that you can't use Cmd+Shift+W after Cmd+W? The test could also use win.closed rather than checking for !win.document (which should eliminate the need for a setTimeout, I think).
(In reply to comment #3) > I think !win.document.documentElement.getAttribute("chromehidden") is a better > "is a popup" test. Given that I know the content window for the popup that I've opened, why would that be better? Seems more explicit the way it is. > This change to ignore the pref for popups might make sense, but isn't the real > bug the fact that you can't use Cmd+Shift+W after Cmd+W? I don't know, I can't reproduce it (Henrik says it's OSX-only) and don't see where exactly it would fail. But if the Cmd+Shift+W malfunction depends on Cmd+W, then it's kind of irrelevant, because Cmd+W should already close the window. > The test could also use win.closed rather than checking for !win.document > (which should eliminate the need for a setTimeout, I think). I didn't know that, will try to eliminate the setTimeout.
Attached patch patch v2 (obsolete) — Splinter Review
using win.closed
Attachment #368540 - Attachment is obsolete: true
Attachment #368720 - Flags: review?(gavin.sharp)
Attachment #368540 - Flags: review?(gavin.sharp)
(In reply to comment #4) > (In reply to comment #3) > > I think !win.document.documentElement.getAttribute("chromehidden") is a better > > "is a popup" test. > > Given that I know the content window for the popup that I've opened, why would > that be better? Seems more explicit the way it is. I meant for the patch, not the test.
But the tabstrip visiblity depends on window.toolbar.visible. Maybe it shouldn't?
Why should it be based on tabstrip visibility? I thought the argument was that chrome-reduced popups are unlikely to be useful for general navigation, so people are unlikely to want the window-preserving behavior, and navigation bar visibility is more relevant than tabstrip visibility as far as navigation goes.
The tabstrip visiblity is relevant for navigation since it implies a "new tab" button. The location bar's read-only-ness depends on window.toolbar.visible, too. I'm not sure that window.toolbar.visible is the right dependency in general, but I don't think this bug should be an exception.
Well, we use getAttribute("chromehidden") in getMostRecentBrowserWindow, though I forget the exact reason. It seems to have been changed in bug 337344.
Attached patch patch v2.1 (obsolete) — Splinter Review
using synthesizeKey instead of removeTab, nothing else changed
Attachment #368720 - Attachment is obsolete: true
Attachment #368769 - Flags: review?(gavin.sharp)
Attachment #368720 - Flags: review?(gavin.sharp)
Blocks: 485237
Attached patch patch v2.1 (obsolete) — Splinter Review
updated to latest trunk
Attachment #368769 - Attachment is obsolete: true
Attachment #369343 - Flags: review?(gavin.sharp)
Attachment #368769 - Flags: review?(gavin.sharp)
Attached patch patch v2.1 (obsolete) — Splinter Review
updated to latest trunk
Attachment #369343 - Attachment is obsolete: true
Attachment #370282 - Flags: review?(gavin.sharp)
Attachment #369343 - Flags: review?(gavin.sharp)
Attached patch patch v2.1Splinter Review
updated to latest trunk
Attachment #370282 - Attachment is obsolete: true
Attachment #371126 - Flags: review?(gavin.sharp)
Attachment #370282 - Flags: review?(gavin.sharp)
Blocks: 489689
Blocks: 490596
No longer blocks: 490596
From end-user point of view, pressing CtrlW on a window without a tabbar should always close it, even with closeWindowWithLastTab = false. If there is no tabbar visible, there is no concept of last tab, and thus is the window tabless, and should operate like that. closeWindowWithLastTab = false should only prevent closing the window when the last tab of the tabbar is being closed, with a visible tabbar. Or better, when closeWindowWithLastTab = false the cmd_close operation should not fire on the last empty tab (with tabbar visible).
Flags: blocking-firefox3.6?
Not blocking, as it's based on a hidden pref, but would take a safe patch with tests.
Flags: wanted-firefox3.6+
Flags: blocking-firefox3.6?
Flags: blocking-firefox3.6-
Attachment #371126 - Flags: review?(gavin.sharp) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
Attachment #371126 - Flags: approval1.9.2?
Verified fixed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20091108 Minefield/3.7a1pre (.NET CLR 3.5.30729) ID:20091108045014
Status: RESOLVED → VERIFIED
Attachment #371126 - Flags: approval1.9.2? → approval1.9.2+
Verified on 1.9.2 with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2b5pre) Gecko/20091126 Namoroka/3.6b5pre ID:20091126033851
Keywords: verified1.9.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: