Temporary fix for mousewheel problem of select in FF and IE.
Resolve #247.
This commit is contained in:
parent
05b20f45ef
commit
e9fcc0f02a
@ -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];
|
||||||
|
Loading…
Reference in New Issue
Block a user