-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Chrome Dev Tools - Mobile] Unable to preventDefault inside passive event listener due to target being treated as passive. #468
Comments
Sorry for the trouble, this is a breaking change in Chrome 56 to improve scroll performance. You probably need to add an appropriate |
Could you possibly provide the correct usage of touch-action that would completely disable touch scrolling on certain elements? "touch-action: none;" doesn't seem to do the trick for me. |
Turns out this is very simple to fix. I havent had time to check which ones of these are actually needed... but i fixed it by changing lines 511 - 517 to if (global.navigator.pointerEnabled) {
crossvent[op](el, pointers[type], fn, { passive: false });
} else if (global.navigator.msPointerEnabled) {
crossvent[op](el, microsoft[type], fn, { passive: false });
} else {
crossvent[op](el, touch[type], fn, { passive: false });
crossvent[op](el, type, fn, { passive: false });
} See https://www.chromestatus.com/features/5093566007214080 and for details about the recent updates https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener. |
Seems dragula has some bindings for pointerevents. And those really are the preferred approach albeit I don't know if your use case works correctly with pointer events because perhaps it has a similar issue. but ultimately I'd recommend changing to actually if (global.PointerEvent) since it appears global === window |
And Also note that your use of |
My issue was solved by adding |
we can also set touch-action: none, that way we have better browser compatability see: https://www.chromestatus.com/features/5093566007214080 and: bevacqua/dragula#468
@625alex can you show how you use |
where did you exactly add it? |
You can also just |
I had this same issue and I fixed it as follows in CSS:
Simply create a CSS class with touch-action: none for the HTML element that gets dragged/dropped. |
I only had this issue while using the dragula.min.js |
A stream of errors that said "[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080" would sometimes appear on Chrome when zooming the preview with a touch screen. Fix is from [this issue.](bevacqua/dragula#468 (comment)).
A stream of errors that said "[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080" would sometimes appear on Chrome when zooming the preview with a touch screen. Fix is from [this issue.](bevacqua/dragula#468 (comment)).
it is working (for example "react-draggable-list" has not been working in my project (for mobile devices)) Thank you |
Just saw a warning on Latest Chrome Dev Tools - Mobile Mode.
Follow this link may help: http://stackoverflow.com/questions/42206645/konvajs-unable-to-preventdefault-inside-passive-event-listener-due-to-target-be
The text was updated successfully, but these errors were encountered: