chosen icon indicating copy to clipboard operation
chosen copied to clipboard

Unable to preventDefault inside passive event listener invocation.

Open applibs opened this issue 2 years ago • 1 comments

Anybody has same problem?

Unable to preventDefault inside passive event listener invocation.

Snímek obrazovky 2023-11-09 164039

applibs avatar Nov 09 '23 15:11 applibs

This is my fix:

Chosen.prototype.search_results_mousewheel = function (evt) {
            var delta;
            if (evt.originalEvent) {
                delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
            }
            if (delta != null) {
                if (evt.cancelable) {
                    evt.preventDefault();
                }
                //evt.preventDefault();
                if (evt.type === 'DOMMouseScroll') {
                    delta = delta * 40;
                }
                return this.search_results.scrollTop(delta + this.search_results.scrollTop());
            }
        };

applibs avatar Nov 09 '23 19:11 applibs