Fix wheel scrolling on LiveGrid content master
authorJoey Schulze <joey@infodrom.org>
Wed, 30 Sep 2015 17:33:51 +0000 (19:33 +0200)
committerJoey Schulze <joey@infodrom.org>
Wed, 30 Sep 2015 17:33:51 +0000 (19:33 +0200)
In Rico3 this.tabs contains 3 elements, not 2 as in Rico2
Wheel scroll delta defaults to 0 but is not adjusted for Gecko,
thus use 1 as default value

minsrc/ricoLiveGrid.js

index e7c726b..adabf58 100644 (file)
@@ -1935,7 +1935,7 @@ Rico.LiveGridMethods = {
      if (this.scrollPluggedIn) return;
      Rico.log("pluginScroll: wheelEvent="+this.wheelEvent);
      Rico.eventBind(this.scrollDiv,"scroll",this.scrollEventFunc, false);
      if (this.scrollPluggedIn) return;
      Rico.log("pluginScroll: wheelEvent="+this.wheelEvent);
      Rico.eventBind(this.scrollDiv,"scroll",this.scrollEventFunc, false);
-     for (var t=0; t<2; t++)
+     for (var t=0; t<3; t++)
        Rico.eventBind(this.tabs[t],this.wheelEvent,this.wheelEventFunc, false);
      this.scrollPluggedIn=true;
   },
        Rico.eventBind(this.tabs[t],this.wheelEvent,this.wheelEventFunc, false);
      this.scrollPluggedIn=true;
   },
@@ -1950,7 +1950,7 @@ Rico.LiveGridMethods = {
   },
 
   handleWheel: function(e) {
   },
 
   handleWheel: function(e) {
-    var delta = 0;
+    var delta = 1;
     if (e.wheelDelta) {
       if (Rico.isOpera)
         delta = e.wheelDelta/120;
     if (e.wheelDelta) {
       if (Rico.isOpera)
         delta = e.wheelDelta/120;