From 30997e38c2164516865f5d3258c225a58a2a32e5 Mon Sep 17 00:00:00 2001 From: Jonathan Wilde Date: Thu, 1 Aug 2013 11:59:17 -0700 Subject: [PATCH] Bug 899726 - Defect - during keyboard showing/hiding, sometimes hidden appbars show up. r=mbrubeck --HG-- extra : rebase_source : 520ea7bbfb5667cb96d603ec876fd8bc9a9610ec --- browser/metro/base/content/ContextUI.js | 4 +++- .../metro/base/content/bindings/appbar.xml | 15 +++++++++---- .../base/content/helperui/FindHelperUI.js | 11 +++++----- browser/metro/theme/browser.css | 4 ---- browser/metro/theme/platform.css | 22 +++++++++++++------ 5 files changed, 35 insertions(+), 21 deletions(-) diff --git a/browser/metro/base/content/ContextUI.js b/browser/metro/base/content/ContextUI.js index 3abba471a434..5e0a05077071 100644 --- a/browser/metro/base/content/ContextUI.js +++ b/browser/metro/base/content/ContextUI.js @@ -181,7 +181,9 @@ var ContextUI = { // Dismiss the navbar if visible. dismissNavbar: function dismissNavbar() { - Elements.navbar.dismiss(); + if (!StartUI.isVisible) { + Elements.navbar.dismiss(); + } }, // Dismiss the tabstray if visible. diff --git a/browser/metro/base/content/bindings/appbar.xml b/browser/metro/base/content/bindings/appbar.xml index ccf4792b37cd..5e11962ef9ec 100644 --- a/browser/metro/base/content/bindings/appbar.xml +++ b/browser/metro/base/content/bindings/appbar.xml @@ -1,9 +1,9 @@ - + - - + + @@ -29,13 +29,20 @@ ]]> - + diff --git a/browser/metro/base/content/helperui/FindHelperUI.js b/browser/metro/base/content/helperui/FindHelperUI.js index 5d49bedc38f3..a0308287a0e4 100644 --- a/browser/metro/base/content/helperui/FindHelperUI.js +++ b/browser/metro/base/content/helperui/FindHelperUI.js @@ -116,15 +116,16 @@ var FindHelperUI = { // Shutdown selection related ui SelectionHelperUI.closeEditSession(); - this.search(this._textbox.value); - this._textbox.select(); - this._textbox.focus(); - this._open = true; - let findbar = this._container; setTimeout(() => { Elements.browsers.setAttribute("findbar", true); findbar.show(); + + this.search(this._textbox.value); + this._textbox.select(); + this._textbox.focus(); + + this._open = true; }, 0); // Prevent the view to scroll automatically while searching diff --git a/browser/metro/theme/browser.css b/browser/metro/theme/browser.css index 88b536851efd..97ec4c91927d 100644 --- a/browser/metro/theme/browser.css +++ b/browser/metro/theme/browser.css @@ -444,10 +444,6 @@ documenttab[selected] .documenttab-selection { /* Navigation bar ========================================================== */ -#navbar[startpage] { - transform: none; -} - /* Progress meter ---------------------------------------------------------- */ #progress-container { diff --git a/browser/metro/theme/platform.css b/browser/metro/theme/platform.css index 2ba893ba4c05..171d1d6f424e 100644 --- a/browser/metro/theme/platform.css +++ b/browser/metro/theme/platform.css @@ -679,6 +679,7 @@ arrowbox { } /* App bars ----------------------------------------------------------------- */ + appbar { display: block; position: fixed; @@ -687,15 +688,12 @@ appbar { transform: translateY(100%); transition: transform @metro_animation_duration@ @metro_animation_easing@; font-size: 0; + visibility: hidden; } -appbar toolbar { - -moz-appearance: none; - -moz-box-align: center; - border: 0; - width: 100%; - min-height: @toolbar_height@; - font-size: 1rem; +appbar[hiding], +appbar[visible] { + visibility: visible; } appbar[visible] { @@ -709,6 +707,16 @@ appbar[visible] { 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 { border: 0; margin: 0 @toolbar_horizontal_spacing@;