author | Lucas Rocha <lucasr@mozilla.com> |
Fri, 19 Aug 2011 09:29:22 -0700 | |
changeset 75566 | fd7bf2557b25d18d4fc6057199a7230c68c7d64c |
parent 75565 | 241af714f92df2d108448975263213c9ae3699a0 |
child 75567 | 82b14f7ed86d736696fbe68e9a6d0ae891f59be6 |
push id | 21040 |
push user | bmo@edmorley.co.uk |
push date | Sun, 21 Aug 2011 18:16:59 +0000 |
treeherder | mozilla-central@482742e6fff7 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mbrubeck |
bugs | 666257 |
milestone | 9.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/mobile/chrome/content/browser-ui.js +++ b/mobile/chrome/content/browser-ui.js @@ -267,42 +267,44 @@ var BrowserUI = { set activePanel(aPanel) { if (this._activePanel == aPanel) return; let awesomePanel = document.getElementById("awesome-panels"); let awesomeHeader = document.getElementById("awesome-header"); + let willHidePanel = (this._activePanel && !aPanel); + if (willHidePanel) { + awesomePanel.hidden = true; + awesomeHeader.hidden = false; + this._edit.reset(); + this._edit.detachController(); + } + + if (this._activePanel) { + this.popDialog(); + this._activePanel.close(); + } + let willShowPanel = (!this._activePanel && aPanel); if (willShowPanel) { - this.pushDialog(aPanel); this._edit.attachController(); this._editURI(); awesomePanel.hidden = awesomeHeader.hidden = false; }; if (aPanel) { + this.pushDialog(aPanel); aPanel.open(); + if (this._edit.value == "") this._showURI(); } - let willHidePanel = (this._activePanel && !aPanel); - if (willHidePanel) { - awesomePanel.hidden = true; - awesomeHeader.hidden = false; - this._edit.reset(); - this._edit.detachController(); - this.popDialog(); - } - - if (this._activePanel) - this._activePanel.close(); - // If the keyboard will cover the full screen, we do not want to show it right away. let isReadOnly = (aPanel != AllPagesList || this._isKeyboardFullscreen() || (!willShowPanel && this._edit.readOnly)); this._edit.readOnly = isReadOnly; if (isReadOnly) this._edit.blur(); this._activePanel = aPanel; if (willHidePanel || willShowPanel) {