Temporary fix for mousewheel problem of select in FF and IE.

Resolve #247.
This commit is contained in:
Hyunje Alex Jun 2014-11-11 13:29:09 +00:00
parent 05b20f45ef
commit e9fcc0f02a

View File

@ -52,6 +52,8 @@
}; };
}; };
var isWebkit = 'WebkitAppearance' in document.documentElement.style;
$.fn.perfectScrollbar = function (suppliedSettings, option) { $.fn.perfectScrollbar = function (suppliedSettings, option) {
return this.each(function () { return this.each(function () {
@ -363,6 +365,13 @@
} }
function mousewheelHandler(e) { function mousewheelHandler(e) {
// FIXME: this is a quick fix for the select problem in FF and IE.
// If there comes an effective way to deal with the problem,
// this lines should be removed.
if (!isWebkit && $this.find('select:focus').length > 0) {
return;
}
var delta = getDeltaFromEvent(e); var delta = getDeltaFromEvent(e);
var deltaX = delta[0]; var deltaX = delta[0];