Bug 981310 - Displayed error tapping navbar under input element after URL TextSelection, r=jimm

This commit is contained in:
Mark Capella 2014-03-11 19:25:28 -04:00
parent 9e95cbfb16
commit ff024b59ab
2 changed files with 18 additions and 2 deletions

View File

@ -173,11 +173,20 @@ var ContextUI = {
}, aDelay);
},
// Display the nav bar
/*
* Display the nav bar.
*
* @return false if we were already visible, and didn't do anything.
*/
displayNavbar: function () {
if (Elements.chromeState.getAttribute("navbar") == "visible") {
return false;
}
Elements.navbar.show();
Elements.chromeState.setAttribute("navbar", "visible");
ContentAreaObserver.updateContentArea();
return true;
},
// Display the tab tray

View File

@ -284,8 +284,15 @@
Elements.urlbarState.setAttribute("editing", true);
this._lastKnownGoodURL = this.value;
if (!this.focused)
if (!this.focused) {
this.focus();
// If we force focus, ensure we're visible.
if (ContextUI.displayNavbar()) {
// If we forced visibility, ensure we're positioned above keyboard.
// (Previous "blur" may have forced us down behind it.)
ContentAreaObserver.updateAppBarPosition();
}
}
this._clearFormatting();
this.select();