Bug 899726 - Defect - during keyboard showing/hiding, sometimes hidden appbars show up. r=mbrubeck

--HG--
extra : rebase_source : 520ea7bbfb5667cb96d603ec876fd8bc9a9610ec
This commit is contained in:
Jonathan Wilde 2013-08-01 11:59:17 -07:00
parent ea9c6bf9a5
commit 30997e38c2
5 changed files with 35 additions and 21 deletions

View File

@ -181,7 +181,9 @@ var ContextUI = {
// Dismiss the navbar if visible. // Dismiss the navbar if visible.
dismissNavbar: function dismissNavbar() { dismissNavbar: function dismissNavbar() {
Elements.navbar.dismiss(); if (!StartUI.isVisible) {
Elements.navbar.dismiss();
}
}, },
// Dismiss the tabstray if visible. // Dismiss the tabstray if visible.

View File

@ -1,9 +1,9 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl" <bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="appbarBinding"> <binding id="appbarBinding">
<content> <content>
<xul:toolbar anonid="toolbar"><children/></xul:toolbar> <xul:toolbar anonid="toolbar"><children/></xul:toolbar>
</content> </content>
@ -29,13 +29,20 @@
]]> ]]>
</body> </body>
</method> </method>
<method name="dismiss"> <method name="dismiss">
<body> <body>
<![CDATA[ <![CDATA[
if (!this.isShowing) if (!this.isShowing)
return; return;
let self = this;
this.setAttribute("hiding", "true");
this.addEventListener("transitionend", function appbar_transitionend() {
self.removeEventListener("transitionend", appbar_transitionend, false);
self.removeAttribute("hiding");
}, false);
this._fire("MozAppbarDismissing"); this._fire("MozAppbarDismissing");
this.removeAttribute("visible"); this.removeAttribute("visible");
]]> ]]>

View File

@ -116,15 +116,16 @@ var FindHelperUI = {
// Shutdown selection related ui // Shutdown selection related ui
SelectionHelperUI.closeEditSession(); SelectionHelperUI.closeEditSession();
this.search(this._textbox.value);
this._textbox.select();
this._textbox.focus();
this._open = true;
let findbar = this._container; let findbar = this._container;
setTimeout(() => { setTimeout(() => {
Elements.browsers.setAttribute("findbar", true); Elements.browsers.setAttribute("findbar", true);
findbar.show(); findbar.show();
this.search(this._textbox.value);
this._textbox.select();
this._textbox.focus();
this._open = true;
}, 0); }, 0);
// Prevent the view to scroll automatically while searching // Prevent the view to scroll automatically while searching

View File

@ -444,10 +444,6 @@ documenttab[selected] .documenttab-selection {
/* Navigation bar ========================================================== */ /* Navigation bar ========================================================== */
#navbar[startpage] {
transform: none;
}
/* Progress meter ---------------------------------------------------------- */ /* Progress meter ---------------------------------------------------------- */
#progress-container { #progress-container {

View File

@ -679,6 +679,7 @@ arrowbox {
} }
/* App bars ----------------------------------------------------------------- */ /* App bars ----------------------------------------------------------------- */
appbar { appbar {
display: block; display: block;
position: fixed; position: fixed;
@ -687,15 +688,12 @@ appbar {
transform: translateY(100%); transform: translateY(100%);
transition: transform @metro_animation_duration@ @metro_animation_easing@; transition: transform @metro_animation_duration@ @metro_animation_easing@;
font-size: 0; font-size: 0;
visibility: hidden;
} }
appbar toolbar { appbar[hiding],
-moz-appearance: none; appbar[visible] {
-moz-box-align: center; visibility: visible;
border: 0;
width: 100%;
min-height: @toolbar_height@;
font-size: 1rem;
} }
appbar[visible] { appbar[visible] {
@ -709,6 +707,16 @@ appbar[visible] {
bottom @appbar_keyboard_slideup_duration@ @metro_animation_easing@; bottom @appbar_keyboard_slideup_duration@ @metro_animation_easing@;
} }
appbar toolbar {
-moz-appearance: none;
-moz-box-align: center;
border: 0;
width: 100%;
min-height: @toolbar_height@;
font-size: 1rem;
}
appbar toolbar toolbarbutton { appbar toolbar toolbarbutton {
border: 0; border: 0;
margin: 0 @toolbar_horizontal_spacing@; margin: 0 @toolbar_horizontal_spacing@;