From b49d0a96a4504bde421f890f0fd8e6ff29153891 Mon Sep 17 00:00:00 2001 From: Buu-Minh Ta Date: Tue, 26 Apr 2011 10:48:58 +0200 Subject: [PATCH] Bug 615728 - When selecting an empty tab, autofocus on the location bar. r=dao --- browser/base/content/tabbrowser.xml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 710678dcdb9..1319ee8118d 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -962,14 +962,13 @@ // In full screen mode, only bother making the location bar visible // if the tab is a blank one. oldBrowser._urlbarFocused = (gURLBar && gURLBar.focused); - if (newBrowser._urlbarFocused && gURLBar) { - if (!window.fullScreen) { - gURLBar.focus(); - break; - } else if (isTabEmpty(this.mCurrentTab)) { - focusAndSelectUrlBar(); - break; - } + if (newBrowser._urlbarFocused && gURLBar && !window.fullScreen) { + gURLBar.focus(); + break; + } + if (isTabEmpty(this.mCurrentTab)) { + focusAndSelectUrlBar(); + break; } // If the find bar is focused, keep it focused.