SiLeBAT / fcl-client

Web app for analyzing food delivery networks
https://silebat.github.io/fcl-client/
GNU General Public License v3.0
7 stars 2 forks source link

prevent roa editor wheel event console messages #867

Open ruegenbfr opened 2 months ago

ruegenbfr commented 2 months ago

If the user uses wheel gestures in roa report editor view error messages are reported in the browser console:

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.

This issue seems to effect only cromium based browsers (chrome, edge).

Reproduction:

Reason:

The mxClient.js (from deprecated mxGraph) tries to prevent the browser's default behaviour on wheel events.

Background:

Since Chrome 51, an event listener can be set as "passive". Passive event listeners were introduced to optimize scrolling performance on a device. When you use a passive event listener on your site, you promise not to use a preventDefault() in that listener to disable scrolling. This frees the browser up to respond to scrolling immediately without waiting for JavaScript, thus ensuring the user's reliably smooth scrolling experience. A passive event listener is mainly used in touchstart, touchmove or wheel listeners.

Solution:

? (Since we are in no control over mxGraph and this graph is no longer maintained)

Main purpose of this ticket:

Issue documentation