Bug 381508 - XUL editable menulist shouldn't use document.commandDispatcher. r=sr=neil
authorsdwilsh@shawnwilsher.com
Wed, 23 May 2007 13:13:22 -0700
changeset 1798 0a80ffb1748606bb22ea074648b9288b4e5e2a78
parent 1797 03a5c5b2746647d5d5c589722ba1d6b9ae021d56
child 1799 35a0a553e365904970b1be23fcbf91bf14688e13
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)
reviewerssr
bugs381508
milestone1.9a5pre
Bug 381508 - XUL editable menulist shouldn't use document.commandDispatcher. r=sr=neil
toolkit/content/widgets/menulist.xml
xpfe/global/resources/content/bindings/menulist.xml
--- a/toolkit/content/widgets/menulist.xml
+++ b/toolkit/content/widgets/menulist.xml
@@ -507,17 +507,17 @@
         </body>
       </method>
     </implementation>
 
     <handlers>
       <handler event="focus" phase="capturing">
         <![CDATA[
           if (!this.hasAttribute('focused')) {
-            if (document.commandDispatcher.focusedElement != this.inputField)
+            if (event.originalTarget != this.inputField)
               this.inputField.focus();
             this.setAttribute('focused','true');
           }
         ]]>
       </handler>
 
       <handler event="blur" phase="capturing">
         <![CDATA[
--- a/xpfe/global/resources/content/bindings/menulist.xml
+++ b/xpfe/global/resources/content/bindings/menulist.xml
@@ -475,17 +475,17 @@
         </body>
       </method>
     </implementation>
 
     <handlers>
       <handler event="focus" phase="capturing">
         <![CDATA[
           if (!this.hasAttribute('focused')) {
-            if (document.commandDispatcher.focusedElement != this.inputField)
+            if (event.originalTarget != this.inputField)
               this.inputField.focus();
             this.setAttribute('focused','true');
           }
         ]]>
       </handler>
 
       <handler event="blur" phase="capturing">
         <![CDATA[