Bug 591151 - Allow auto edit-mode on key press when awesomescreen is open, but readonly [r=vingtetun]
authorMark Finkle <mfinkle@mozilla.com>
Fri, 27 Aug 2010 10:22:27 +0200
changeset 66507 e3e522c3b1bc88567eac1a92d2e5adbfcf06289e
parent 66506 f919686864566fc2093320e92074b42a08d55bdc
child 66508 03aa50af67cb4c2263141a8765085ccac717a0ec
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)
reviewersvingtetun
bugs591151
Bug 591151 - Allow auto edit-mode on key press when awesomescreen is open, but readonly [r=vingtetun]
mobile/chrome/content/bindings.xml
--- a/mobile/chrome/content/bindings.xml
+++ b/mobile/chrome/content/bindings.xml
@@ -24,19 +24,22 @@
           // controller would otherwise close us because of an empty search
           // string.
           if (this.value == "")
             this.showHistoryPopup();
         ]]></body>
       </method>
     </implementation>
     <handlers>
-      <handler event="keypress" keycode="VK_RETURN" phase="capturing">
+      <handler event="keypress" phase="capturing">
         <![CDATA[
-          setTimeout(function() { BrowserUI.activePanel = null }, 0);
+          if (event.keyCode == event.DOM_VK_RETURN)
+            setTimeout(function() { BrowserUI.activePanel = null }, 0);
+          else if (this.readOnly)
+            this.readOnly = false;
         ]]>
       </handler>
       <handler event="text" phase="bubbling"
                action="if (this.mController.input == this) this.mController.handleText();"/>
     </handlers>
   </binding>
 
   <binding id="popup_autocomplete_result">