Bug 1492522 - Port Bug 1465219: Replace MenuBoxObject with XULElement subclass in suite/. r=frg
authorJorg K <jorgk@jorgk.com>
Wed, 19 Sep 2018 10:25:00 +0200
changeset 33196 5fca7138f5f682d588e3a7784673e9214dcf8e26
parent 33195 eaea6529063503444eae601f57800eec06f0ffee
child 33197 9567ebfd9783fd7b82956e59a18ed58d6f97faff
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersfrg
bugs1492522, 1465219
Bug 1492522 - Port Bug 1465219: Replace MenuBoxObject with XULElement subclass in suite/. r=frg
suite/browser/nsTypeAheadFind.js
suite/components/sync/content/syncSetup.js
suite/mailnews/mailWidgets.xml
--- a/suite/browser/nsTypeAheadFind.js
+++ b/suite/browser/nsTypeAheadFind.js
@@ -154,17 +154,18 @@ typeAheadFind.prototype = {
     var window = aEvent.currentTarget;
     var element = window.document.commandDispatcher.focusedElement;
     if (element.nodeType == element.ELEMENT_NODE &&
         element.namespaceURI == "http://www.w3.org/1999/xhtml" &&
         element.isContentEditable)
       return true;
 
     // Don't start a find if the focus is on a form element.
-    if (ChromeUtils.getClassName(element) === "XULElement" ||
+    if ((element.nodeType == element.ELEMENT_NODE &&
+         element.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul") ||
         ChromeUtils.getClassName(element) === "HTMLEmbedElement" ||
         ChromeUtils.getClassName(element) === "HTMLObjectElement" ||
         ChromeUtils.getClassName(element) === "HTMLSelectElement" ||
         ChromeUtils.getClassName(element) === "HTMLTextAreaElement")
       return true;
 
     // Don't start a find if the focus is on an editable field
     if (ChromeUtils.getClassName(element) === "HTMLInputElement" &&
--- a/suite/components/sync/content/syncSetup.js
+++ b/suite/components/sync/content/syncSetup.js
@@ -644,17 +644,17 @@ var gSyncSetup = {
 
   _updateControl: function(controlId) {
     let control = document.getElementById(controlId);
     if (control.selectedIndex == 0) {
       control.editable = false;
       Weave.Svc.Prefs.reset("serverURL");
     } else {
       // Prevent double selection upon using down key.
-      control.menuBoxObject.activeChild = null;
+      control.activeChild = null;
       control.editable = true;
       control.value = "";
     }
     // Force a style flush to ensure that the binding is attached.
     control.clientTop;
     control.focus();
     return control;
   },
--- a/suite/mailnews/mailWidgets.xml
+++ b/suite/mailnews/mailWidgets.xml
@@ -1641,17 +1641,17 @@
             }
           ]]>
         </body>
       </method>
       <method name="onBlurMenuList">
         <parameter name="event"/>
         <body>
           <![CDATA[
-            this.boxObject.openMenu(false);
+            this.openMenu(false);
           ]]>
         </body>
       </method>
       <field name="onKeyPressMenuList" readonly="true">
         <![CDATA[
           ({
             self: this,
             tree: this.tree,