Just a proof of concept because the parameter {passive: true} seems to exist only in Chrome:
Code:
Ext.define('Overrides.event.publisher.Dom', {
override: 'Ext.event.publisher.Dom',
addDelegatedListener: function(eventName) {
this.delegatedListeners[eventName] = 1;
if (eventName === 'mousewheel') {
this.target.addEventListener(
eventName, this.onDelegatedEvent, {passive: true}
);
} else {
this.target.addEventListener(
eventName, this.onDelegatedEvent, !!this.captureEvents[eventName]
);
}
},
addDirectListener: function (eventName, element, capture) {
if (eventName === 'scroll') {
element.dom.addEventListener(
eventName,
capture ? this.onDirectCaptureEvent : this.onDirectEvent,
{passive: true}
);
} else {
element.dom.addEventListener(
eventName,
capture ? this.onDirectCaptureEvent : this.onDirectEvent,
capture
);
}
}
}) ;
I wrote it for ExtJS 6.2.0.981, but probably it is a class that does not change much and works as is with other versions.