diff --git a/guacamole-common-js/src/main/webapp/modules/Mouse.js b/guacamole-common-js/src/main/webapp/modules/Mouse.js index 2f8bc28b50..083616e3c6 100644 --- a/guacamole-common-js/src/main/webapp/modules/Mouse.js +++ b/guacamole-common-js/src/main/webapp/modules/Mouse.js @@ -258,9 +258,16 @@ Guacamole.Mouse = function Mouse(element) { } - element.addEventListener('DOMMouseScroll', mousewheel_handler, false); - element.addEventListener('mousewheel', mousewheel_handler, false); - element.addEventListener('wheel', mousewheel_handler, false); + if (window.WheelEvent) { + // All modern browsers support wheel events. + element.addEventListener('wheel', mousewheel_handler, false); + } + else { + // Legacy FireFox wheel events. + element.addEventListener('DOMMouseScroll', mousewheel_handler, false); + // Legacy Chrome/IE/other wheel events. + element.addEventListener('mousewheel', mousewheel_handler, false); + } /** * Whether the browser supports CSS3 cursor styling, including hotspot