fix slider mousewheel action

This commit is contained in:
Jakob Ketterl 2019-10-27 15:09:34 +01:00
parent cd2da582c4
commit 944e9df7cc

View File

@ -1931,11 +1931,10 @@ function initSliders() {
if (!$slider.attr('step')) return;
var val = Number($slider.val());
var step = Number($slider.attr('step'));
if (ev.originalEvent.wheelDelta < 0) {
if (ev.originalEvent.deltaY > 0) {
step *= -1;
}
val += step;
$slider.val(val + (ev.originalEvent.wheelDelta > 0 ? 1 : -1));
$slider.val(val + step);
$slider.trigger('change');
});
}