Bug 678834 - XUL scrollbox should preventDefault() processed scroll events so that Gecko doesn't attempt to start a swipe from them. r=enndeakin
authorMarkus Stange <mstange@themasta.com>
Thu, 08 Sep 2011 15:31:01 +0200
changeset 76728 a8a9ade7fefb035cb485ca735ddcd441ea2bb53b
parent 76727 9943ca23ec8a552704091608067c911ec32ae701
child 76729 2bce36a017afe60c242322753f7f3e84fab21bbf
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersenndeakin
bugs678834
milestone9.0a1
Bug 678834 - XUL scrollbox should preventDefault() processed scroll events so that Gecko doesn't attempt to start a swipe from them. r=enndeakin
toolkit/content/widgets/scrollbox.xml
--- a/toolkit/content/widgets/scrollbox.xml
+++ b/toolkit/content/widgets/scrollbox.xml
@@ -485,16 +485,22 @@
             this.scrollByIndex(this._isRTLScrollbox ? -event.detail : event.detail);
 
           if (this._prevMouseScrolls.length > 1)
             this._prevMouseScrolls.shift();
           this._prevMouseScrolls.push(isVertical);
         }
 
         event.stopPropagation();
+        event.preventDefault();
+      ]]></handler>
+
+      <handler event="MozMousePixelScroll"><![CDATA[
+        event.stopPropagation();
+        event.preventDefault();
       ]]></handler>
 
       <handler event="underflow" phase="capturing"><![CDATA[
         // filter underflow events which were dispatched on nested scrollboxes
         if (event.target != this)
           return;
 
         // Ignore events that doesn't match our orientation.