From af7194114a773ecf0859d781a671506f45e481b3 Mon Sep 17 00:00:00 2001 From: Hyunje Alex Jun Date: Thu, 1 Aug 2013 02:01:42 +0900 Subject: [PATCH] Fix Firefox scrolling problem in OS X. In OS X, there was the problem that the mousewheel event's preventDefault() doesn't work well. This patch fixes the problem. --- src/perfect-scrollbar.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index 7914234..9039fa7 100644 --- a/src/perfect-scrollbar.js +++ b/src/perfect-scrollbar.js @@ -233,6 +233,10 @@ e.preventDefault(); } }); + + // fix Firefox scroll problem + $this.bind('DOMMouseScroll.perfect-scroll', function (e) { e.preventDefault(); }); + $this.bind('MozMousePixelScroll.perfect-scroll', function (e) { e.preventDefault(); }); }; // bind mobile touch handler