Bug 1348828 - Only prevent default behavior of scroll event if the tree is scrollable. draft
authorJared Wein <jwein@mozilla.com>
Mon, 03 Apr 2017 21:39:55 -0400
changeset 555311 742f247bf51e1b1eb1737f4b79e1f65bc6138225
parent 555310 b5d8b27a753725c1de41ffae2e338798f3b5cacd
child 622584 b7c3333cdbb93537cc5d98574bc95ce9bcd3710c
push id52211
push userbmo:jaws@mozilla.com
push dateTue, 04 Apr 2017 01:40:08 +0000
bugs1348828
milestone55.0a1
Bug 1348828 - Only prevent default behavior of scroll event if the tree is scrollable. MozReview-Commit-ID: AGS103gy08O
toolkit/content/widgets/tree.xml
--- a/toolkit/content/widgets/tree.xml
+++ b/toolkit/content/widgets/tree.xml
@@ -712,19 +712,21 @@
           }
         ]]>
       </handler>
       <handler event="touchend">
         <![CDATA[
           this._touchY = -1;
         ]]>
       </handler>
-      <handler event="MozMousePixelScroll" preventdefault="true"/>
-      <handler event="DOMMouseScroll" preventdefault="true">
+      <handler event="DOMMouseScroll">
         <![CDATA[
+          if (this.getAttribute("hidevscroll") != "true")
+            event.preventDefault();
+
           if (this._editingColumn)
             return;
           if (event.axis == event.HORIZONTAL_AXIS)
             return;
 
           var rows = event.detail;
           if (rows == UIEvent.SCROLL_PAGE_UP)
             this.treeBoxObject.scrollByPages(-1);