Bug 600441 - "[regression] Escape key goes back in history when Form Helper is opened" [r=mark.finkle]
authorVivien Nicolas <21@vingtetun.org>
Tue, 28 Sep 2010 19:19:00 -0400
changeset 66746 f663481e145484ded5338a7f2674f7e7ef6eefe1
parent 66745 632523b71a3e02049d5eb0d4c10e0cbe408f3f0c
child 66747 8f43e5b7b33014fd69b329ab318f29a840c39141
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmark
bugs600441
Bug 600441 - "[regression] Escape key goes back in history when Form Helper is opened" [r=mark.finkle]
mobile/chrome/content/bindings.xml
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/bindings.xml
+++ b/mobile/chrome/content/bindings.xml
@@ -1392,16 +1392,18 @@
       <method name="contentHasChanged">
         <body><![CDATA[
           let height = Math.floor(this.getBoundingClientRect().height);
           this.top = window.innerHeight - height;
           this._spacer.setAttribute("height", height);
         ]]></body>
       </method>
 
+      <property name="isActive" onget="return !this._spacer.hidden;"/>
+
       <field name="_model">null</field>
       <method name="show">
         <parameter name="aModel" />
         <body><![CDATA[
           // call the hide callback of the current object if any
           if (this._model && this._model.type != aModel.type)
             this._model.hide();
 
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -725,16 +725,23 @@ var BrowserUI = {
       return;
 
     // Check open panel
     if (this.isPanelVisible()) {
       this.hidePanel();
       return;
     }
 
+    // Check content helper
+    let contentHelper = document.getElementById("content-navigator");
+    if (contentHelper.isActive) {
+      contentHelper.hide();
+      return;
+    }
+
     // Only if there are no dialogs, popups, or panels open
     let tab = Browser.selectedTab;
     let browser = tab.browser;
 
     if (browser.canGoBack)
       browser.goBack();
     else if (tab.owner)
       this.closeTab(tab);