Closed Bug 603646 Opened 14 years ago Closed 12 years ago

Undo Close Tab should work even when a browser window is not active

Categories

(Firefox :: Tabbed Browser, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- .x+

People

(Reporter: fryn, Assigned: fryn)

References

Details

Attachments

(1 file)

This happens because undoCloseTab tries to access gBrowser.tabs.length.

Fix 1: move the undo close tab <key> from browser-sets.inc to browser.xul

Fix 2: add a gBrowser null check inside undoCloseTab()

Fix 1 seems to make more sense semantically, but that would leave the <key> as the only <key> inside browser.xul rather than browser-sets.inc.

Pick one, please.
FWIW, the patch in bug 594217 currently contains a fix for this.
(In reply to comment #1)
> FWIW, the patch in bug 594217 currently contains a fix for this.

I'm well aware, but that keyboard shortcut is controversial and may never make it into the browser.
Attachment #486225 - Flags: review?(dao) → review+
Attachment #486225 - Flags: approval2.0?
Summary: undoCloseTab() causes 'gBrowser is null' error when no browser window is open → menu bar items / keyboard shortcuts should not cause errors when no browser window is open
Attachment #486225 - Attachment description: patch → part 1: undoCloseTab() should not cause 'gBrowser is null'
part 2 will cover the remainder of the menu bar items that either cause errors or should be disabled for non-browser.xul windows and when no browser.xul window is open.
requesting blocking, since enabled menu bar items like 'Tab Groups' shouldn't do nothing when clicked while a browser window is not focused (either because another window, e.g. error console, is or because no windows are open).
blocking2.0: --- → ?
Summary: menu bar items / keyboard shortcuts should not cause errors when no browser window is open → menu bar items / keyboard shortcuts should not cause errors when a browser window is not focused
Blocking+ for seemingly broken UI.
blocking2.0: ? → betaN+
Attachment #486225 - Flags: approval2.0?
Notes from the Grand Retriage: candidate for branch fix - not ff4-blocking
blocking2.0: betaN+ → .x
Depends on: 562998
Summary: menu bar items / keyboard shortcuts should not cause errors when a browser window is not focused → enabled menu bar items / keyboard shortcuts should all work even when a browser window is not active
Depends on: 616919
Comment on attachment 486225 [details] [diff] [review]
part 1: undoCloseTab() should not cause 'gBrowser is null' (checked in)

Pushed part 1.
http://hg.mozilla.org/mozilla-central/rev/053d35d7eced
Attachment #486225 - Attachment description: part 1: undoCloseTab() should not cause 'gBrowser is null' → part 1: undoCloseTab() should not cause 'gBrowser is null' (checked in)
Attachment #486225 - Attachment filename: gbrowsernull → bug603646-p1.patch
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Summary: enabled menu bar items / keyboard shortcuts should all work even when a browser window is not active → Undo Close Tab should work even when a browser window is not active
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: