Browse Source

Fixes #2261 Bugs with mousewheel events (#2262)

codeClimate
yotamberk 8 years ago
committed by Alexander Wunschik
parent
commit
feab6c5a0d
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      lib/timeline/Core.js

+ 4
- 4
lib/timeline/Core.js View File

@ -207,14 +207,14 @@ Core.prototype._create = function (container) {
event.preventDefault(); event.preventDefault();
} }
if (this.dom.center.addEventListener) {
if (this.dom.centerContainer.addEventListener) {
// IE9, Chrome, Safari, Opera // IE9, Chrome, Safari, Opera
this.dom.center.addEventListener("mousewheel", onMouseWheel.bind(this), false);
this.dom.centerContainer.addEventListener("mousewheel", onMouseWheel.bind(this), false);
// Firefox // Firefox
this.dom.center.addEventListener("DOMMouseScroll", onMouseWheel.bind(this), false);
this.dom.centerContainer.addEventListener("DOMMouseScroll", onMouseWheel.bind(this), false);
} else { } else {
// IE 6/7/8 // IE 6/7/8
this.dom.center.attachEvent("onmousewheel", onMouseWheel.bind(this));
this.dom.centerContainer.attachEvent("onmousewheel", onMouseWheel.bind(this));
} }
function onMouseScrollSide(event) { function onMouseScrollSide(event) {

Loading…
Cancel
Save