From 4aee5efd5e23bcc303264f34b4090b4c73254b3a Mon Sep 17 00:00:00 2001 From: Eugene Fedorenko Date: Fri, 20 Jun 2014 14:23:53 -0400 Subject: [PATCH] Check for deltaY property of wheel event for compatibility with external plugins #1982 --- coffee/chosen.jquery.coffee | 2 +- coffee/chosen.proto.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coffee/chosen.jquery.coffee b/coffee/chosen.jquery.coffee index 6ebcfbd8703..2efa5c79c1d 100644 --- a/coffee/chosen.jquery.coffee +++ b/coffee/chosen.jquery.coffee @@ -141,7 +141,7 @@ class Chosen extends AbstractChosen this.results_reset(evt) if evt.target.nodeName is "ABBR" and not @is_disabled search_results_mousewheel: (evt) -> - delta = -evt.originalEvent.wheelDelta or evt.originalEvent.detail if evt.originalEvent + delta = evt.originalEvent.deltaY or -evt.originalEvent.wheelDelta or evt.originalEvent.detail if evt.originalEvent if delta? evt.preventDefault() delta = delta * 40 if evt.type is 'DOMMouseScroll' diff --git a/coffee/chosen.proto.coffee b/coffee/chosen.proto.coffee index 25c48ea8d5f..1450144c84f 100644 --- a/coffee/chosen.proto.coffee +++ b/coffee/chosen.proto.coffee @@ -137,7 +137,7 @@ class @Chosen extends AbstractChosen this.results_reset(evt) if evt.target.nodeName is "ABBR" and not @is_disabled search_results_mousewheel: (evt) -> - delta = -evt.wheelDelta or evt.detail + delta = evt.deltaY or -evt.wheelDelta or evt.detail if delta? evt.preventDefault() delta = delta * 40 if evt.type is 'DOMMouseScroll'