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

RESOLVED FIXED

Status

()

Firefox
Tabbed Browser
RESOLVED FIXED
7 years ago
5 years ago

People

(Reporter: fryn, Assigned: fryn)

Tracking

Trunk
All
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking2.0 .x+)

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
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.

Comment 1

7 years ago
FWIW, the patch in bug 594217 currently contains a fix for this.
(Assignee)

Comment 2

7 years ago
(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.
See bug 594217 comment 6.
(Assignee)

Comment 4

7 years ago
Created attachment 486225 [details] [diff] [review]
part 1: undoCloseTab() should not cause 'gBrowser is null' (checked in)
Attachment #486225 - Flags: review?(dao)

Updated

7 years ago
Attachment #486225 - Flags: review?(dao) → review+
(Assignee)

Updated

7 years ago
Attachment #486225 - Flags: approval2.0?
(Assignee)

Updated

7 years ago
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
(Assignee)

Updated

7 years ago
Attachment #486225 - Attachment description: patch → part 1: undoCloseTab() should not cause 'gBrowser is null'
(Assignee)

Comment 5

7 years ago
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.
(Assignee)

Comment 6

7 years ago
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+
(Assignee)

Updated

7 years ago
Attachment #486225 - Flags: approval2.0?
Notes from the Grand Retriage: candidate for branch fix - not ff4-blocking
blocking2.0: betaN+ → .x
(Assignee)

Updated

6 years ago
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
(Assignee)

Updated

6 years ago
Depends on: 616919
(Assignee)

Comment 9

6 years ago
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
(Assignee)

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 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.