Bug 611303 - [Regression] Cannot input text in search field in about:config [r=mfinkle]
authorWesley Johnston <wjohnston@mozilla.com>
Thu, 11 Nov 2010 10:07:00 -0500
changeset 66997 2bb8bd9fc299e9ade419f7fdea6df9b376cba117
parent 66996 ba29b4d91fa0953cfe90a33b8e256d9986007d04
child 66998 81c424a5ffb67db4ccd2045a6a47bd107ca01043
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)
reviewersmfinkle
bugs611303
Bug 611303 - [Regression] Cannot input text in search field in about:config [r=mfinkle]
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -1571,21 +1571,21 @@ const ContentTouchHandler = {
 function ContentCustomKeySender(container) {
   container.addEventListener("keypress", this, false);
   container.addEventListener("keyup", this, false);
   container.addEventListener("keydown", this, false);
 }
 
 ContentCustomKeySender.prototype = {
   handleEvent: function handleEvent(aEvent) {
-    aEvent.stopPropagation();
-    aEvent.preventDefault();
-
     let browser = getBrowser();
-    if (browser) {
+    if (browser && browser.getAttribute("remote") == "true") {
+      aEvent.stopPropagation();
+      aEvent.preventDefault();
+
       browser.messageManager.sendAsyncMessage("Browser:KeyEvent", {
         type: aEvent.type,
         keyCode: aEvent.keyCode,
         charCode: (aEvent.type != "keydown") ? aEvent.charCode : null,
         modifiers: this._parseModifiers(aEvent)
       });
     }
   },