Fix scrolling of vfsPath doesn't work in FF. Additionally, make its scrolling rate consistence cross browsers.

This commit is contained in:
Hadi Nategh 2019-01-21 12:34:49 +01:00
parent de154ed152
commit 3769b14378

View File

@ -293,7 +293,8 @@ var et2_vfsPath = (function(){ "use strict"; return et2_vfsName.extend(
this.div.prepend(this.input);
this.setDOMNode(this.div[0]);
this.span.on('wheel', function(e){
this.scrollLeft = this.scrollLeft - (e.originalEvent.wheelDelta/10);
var delta = e.originalEvent.deltaY > 0 ? 30 : -30;
this.scrollLeft = this.scrollLeft - delta;
});
this.input.on('focus', function() {
this.input.val(this.options.value);