Skip to content
Browse files

gesture: fix issue 65

  • Loading branch information...
1 parent 764edd5 commit 115897e6c7762a808ba3e4b0cb73ceafbbaf7a00 Steve Orvell committed May 3, 2012
Showing with 12 additions and 10 deletions.
  1. +12 −10 source/dom/gesture.js
View
22 source/dom/gesture.js
@@ -156,14 +156,16 @@ enyo.gesture.events = {
// Firefox mousewheel handling
enyo.requiresWindow(function() {
- document.addEventListener("DOMMouseScroll", function(inEvent) {
- var e = enyo.clone(inEvent);
- e.preventDefault = function() {
- inEvent.preventDefault();
- };
- e.type = "mousewheel";
- var p = e.VERTICAL_AXIS == e.axis ? "wheelDeltaY" : "wheelDeltaX";
- e[p] = e.detail * -12;
- enyo.dispatch(e);
- }, false);
+ if (document.addEventListener) {
+ document.addEventListener("DOMMouseScroll", function(inEvent) {
+ var e = enyo.clone(inEvent);
+ e.preventDefault = function() {
+ inEvent.preventDefault();
+ };
+ e.type = "mousewheel";
+ var p = e.VERTICAL_AXIS == e.axis ? "wheelDeltaY" : "wheelDeltaX";
+ e[p] = e.detail * -12;
+ enyo.dispatch(e);
+ }, false);
+ }
});

1 comment on commit 115897e

@unwiredben

turns out I was hitting this because I'd accidentally turned on "compatibility mode" in IE9 which really just forces an IE7-view :(

Please sign in to comment.
Something went wrong with that request. Please try again.