Last Comment Bug 603646 - Undo Close Tab should work even when a browser window is not active
: Undo Close Tab should work even when a browser window is not active
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: All Mac OS X
: -- normal (vote)
: ---
Assigned To: Frank Yan (:fryn)
:
Mentors:
Depends on: 562998 616919
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-12 09:05 PDT by Frank Yan (:fryn)
Modified: 2012-08-16 17:09 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
.x+


Attachments
part 1: undoCloseTab() should not cause 'gBrowser is null' (checked in) (2.19 KB, patch)
2010-10-26 16:49 PDT, Frank Yan (:fryn)
dao+bmo: review+
Details | Diff | Review

Description Frank Yan (:fryn) 2010-10-12 09:05:59 PDT
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 Dave Garrett 2010-10-12 09:12:28 PDT
FWIW, the patch in bug 594217 currently contains a fix for this.
Comment 2 Frank Yan (:fryn) 2010-10-12 09:15:00 PDT
(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.
Comment 3 Dão Gottwald [:dao] 2010-10-12 09:31:46 PDT
See bug 594217 comment 6.
Comment 4 Frank Yan (:fryn) 2010-10-26 16:49:51 PDT
Created attachment 486225 [details] [diff] [review]
part 1: undoCloseTab() should not cause 'gBrowser is null' (checked in)
Comment 5 Frank Yan (:fryn) 2010-11-01 12:36:09 PDT
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.
Comment 6 Frank Yan (:fryn) 2010-11-01 17:15:34 PDT
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).
Comment 7 Dietrich Ayala (:dietrich) 2010-11-04 02:45:00 PDT
Blocking+ for seemingly broken UI.
Comment 8 Johnathan Nightingale [:johnath] 2010-12-15 10:20:20 PST
Notes from the Grand Retriage: candidate for branch fix - not ff4-blocking
Comment 9 Frank Yan (:fryn) 2011-04-12 21:44:01 PDT
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

Note You need to log in before you can comment on or make changes to this bug.