From 93e122517235b22f47bfa7a9f396b1f9adf9bab6 Mon Sep 17 00:00:00 2001 From: Mark Finkle Date: Tue, 1 Dec 2009 01:04:55 -0500 Subject: [PATCH] Bug 531071: bypass the awesomescreen when the browser is being opened for specific page [r=gavin] --- mobile/chrome/content/browser-ui.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/mobile/chrome/content/browser-ui.js b/mobile/chrome/content/browser-ui.js index 90401d7e6a5..857a0567816 100644 --- a/mobile/chrome/content/browser-ui.js +++ b/mobile/chrome/content/browser-ui.js @@ -499,8 +499,8 @@ var BrowserUI = { // Give the new page lots of room Browser.hideSidebars(); + this.closeAutoComplete(true); - this._edit.popup.close(); this._edit.value = aURI; var flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP; @@ -515,6 +515,13 @@ var BrowserUI = { BrowserSearch.updateSearchButtons(); this._edit.showHistoryPopup(); }, + + closeAutoComplete: function closeAutoComplete(aResetInput) { + if (aResetInput) + this._edit.popup.close(); + else + this._edit.popup.closePopup(); + }, isAutoCompleteOpen: function isAutoCompleteOpen() { return this._edit.popup.popupOpen; @@ -529,8 +536,7 @@ var BrowserUI = { // Give the new page lots of room Browser.hideSidebars(); - - this._edit.popup.closePopup(); + this.closeAutoComplete(false); // Make sure we're online before attempting to load Util.forceOnline(); @@ -553,12 +559,14 @@ var BrowserUI = { this.hidePanel(); if (aURI == "about:blank") { + // Display awesomebar UI this.showToolbar(true); this.showAutoComplete(); } else { // Give the new page lots of room Browser.hideSidebars(); + this.closeAutoComplete(true); } return tab;