Incompatible with passive event listeners
See original GitHub issueWhen used with recent Chrome builds that support passive event listeners, touch interaction leads to a massive spew of errors:
Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080
PhotoSwipe needs to detect passive event listener support and explicitly register its document level touch handlers with a passive: false
option.
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Passive event listeners | Can I use... Support tables for HTML5 ...
Event listeners created with the passive: true option cannot cancel ( preventDefault() ) the events they receive. Primarily intended to be used with...
Read more >Unable to preventDefault inside passive event listener due to ...
I have taken the code snippet from jquery-3.5.js lib. The snippet in bold causes this issues since the said event(event for which you...
Read more >Browser Compatibility of Passive event listeners on Opera 81
With passive event listeners, the browser can schedule events in the document queues more efficiently. This is especially useful in touch and ...
Read more >Use Passive Event Listeners to prevent scroll interruptions
Use Passive Event Listeners to prevent scroll interruptions · Simple usage · Disable scrolling, touch, or wheel events · Gotcha 1 · Gotcha...
Read more >Promises and Events: Some Pitfalls and Workarounds
addEventListener( event, resolve, { // For simplicity, we will assume passive listeners. // Feel free to expose this as a configuration ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m still having problems with this issue. Because of this, when you use photoswipe on mobile devices, when you swipe to close a image, the page jumps to the top, really bad =/
fixed by v5.0