Showing
1 changed file
with
4 additions
and
2 deletions
@@ -90,13 +90,15 @@ function preventDefault(event) { | @@ -90,13 +90,15 @@ function preventDefault(event) { | ||
90 | } | 90 | } |
91 | 91 | ||
92 | function disableScroll(e) { | 92 | function disableScroll(e) { |
93 | - if (window.addEventListener) {// older FF | 93 | + |
94 | + // older FF | ||
95 | + if (window.addEventListener) { | ||
94 | window.addEventListener('DOMMouseScroll', preventDefault, false); | 96 | window.addEventListener('DOMMouseScroll', preventDefault, false); |
95 | } | 97 | } |
96 | 98 | ||
97 | window.onwheel = preventDefault; // modern standard | 99 | window.onwheel = preventDefault; // modern standard |
98 | window.onmousewheel = document.onmousewheel = preventDefault; // older browsers, IE | 100 | window.onmousewheel = document.onmousewheel = preventDefault; // older browsers, IE |
99 | - window.ontouchmove = preventDefault; // mobile | 101 | + window.ontouchmove = preventDefault; // mobile |
100 | } | 102 | } |
101 | 103 | ||
102 | function enableScroll() { | 104 | function enableScroll() { |
-
Please register or login to post a comment