Bug 688640 - Fix oncommand handlers for boolean settings in Fennec [r=sriram]
authorMatt Brubeck <mbrubeck@mozilla.com>
Fri, 23 Sep 2011 10:21:19 -0700
changeset 77427 6723975148ada5e131dcde33b8ed59c1d24aa50b
parent 77426 2b412df0df6bc5238b6451323095f8d311b450a7
child 77428 b1f9800647c7446ce832bfbadf54c87e5e3c75ca
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewerssriram
bugs688640
milestone9.0a1
Bug 688640 - Fix oncommand handlers for boolean settings in Fennec [r=sriram]
mobile/chrome/content/bindings.xml
--- a/mobile/chrome/content/bindings.xml
+++ b/mobile/chrome/content/bindings.xml
@@ -1855,52 +1855,67 @@
   
   <binding id="setting-fulltoggle-bool" extends="chrome://mozapps/content/extensions/setting.xml#setting-bool">
     <handlers>
       <handler event="click" button="0" phase="capturing">
         <![CDATA[
         event.stopPropagation();
         ]]>
       </handler>
+      <handler event="command" button="0" phase="capturing">
+        <![CDATA[
+        event.stopPropagation();
+        ]]>
+      </handler>
       <handler event="TapSingle" button="0" phase="capturing">
         <![CDATA[
         this.input.setChecked(!this.value);
         this.inputChanged();
-        event.stopPropagation();
+        this.fireEvent("oncommand");
         ]]>
       </handler>
     </handlers>
   </binding>
 
   <binding id="setting-fulltoggle-boolint" extends="chrome://mozapps/content/extensions/setting.xml#setting-boolint">
     <handlers>
       <handler event="click" button="0" phase="capturing">
         <![CDATA[
         event.stopPropagation();
         ]]>
       </handler>
+      <handler event="command" button="0" phase="capturing">
+        <![CDATA[
+        event.stopPropagation();
+        ]]>
+      </handler>
       <handler event="TapSingle" button="0" phase="capturing">
         <![CDATA[
         this.input.setChecked(!this.value);
         this.inputChanged();
-        event.stopPropagation();
+        this.fireEvent("oncommand");
         ]]>
       </handler>
     </handlers>
   </binding>
 
   <binding id="setting-fulltoggle-localized-bool" extends="chrome://mozapps/content/extensions/setting.xml#setting-localized-bool">
     <handlers>
       <handler event="click" button="0" phase="capturing">
         <![CDATA[
         event.stopPropagation();
         ]]>
       </handler>
+      <handler event="command" button="0" phase="capturing">
+        <![CDATA[
+        event.stopPropagation();
+        ]]>
+      </handler>
       <handler event="TapSingle" button="0" phase="capturing">
         <![CDATA[
         this.input.setChecked(!this.value);
         this.inputChanged();
-        event.stopPropagation();
+        this.fireEvent("oncommand");
         ]]>
       </handler>
     </handlers>
   </binding>
 </bindings>