Bug 591151 - Allow auto edit-mode on key press when awesomescreen is open, but readonly [r=vingtetun]
--- 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">