From dfeff3e28cd48593bd880e07c0de3eb0054485d7 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 3 Dec 2009 16:07:43 -0700 Subject: [PATCH] Fix longstanding firefox mousescroll issue --- imp/js/ViewPort.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/imp/js/ViewPort.js b/imp/js/ViewPort.js index 9b331538f..2cb6ce114 100644 --- a/imp/js/ViewPort.js +++ b/imp/js/ViewPort.js @@ -1199,6 +1199,13 @@ ViewPort_Scroller = Class.create({ c.observe(Prototype.Browser.Gecko ? 'DOMMouseScroll' : 'mousewheel', function(e) { var move_num = Math.min(this.vp.getPageSize(), 3); this.moveScroll(this.currentOffset() + ((e.wheelDelta >= 0 || e.detail < 0) ? (-1 * move_num) : move_num)); + /* Mozilla bug https://bugzilla.mozilla.org/show_bug.cgi?id=502818 + * Need to stop or else multiple scroll events may be fired. We + * lose the ability to have the mousescroll bubble up, but that is + * more desirable than having the wrong scrolling behavior. */ + if (Prototype.Browser.Gecko && !e.stop) { + Event.stop(e); + } }.bindAsEventListener(this)); }, -- 2.11.0