bug: non-passive event listener for 'touchstart' event
See original GitHub issuePrerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
- Nightly
Current Behavior
When loading an Ionic/Vue page with verbose logging on in Brave (which is Chromium-based), the following warning appears:
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event.
Consider marking event handler as 'passive' to make the page more responsive.
See https://www.chromestatus.com/feature/5745543795965952
enableScrollAssist @ input-shims.js:182
registerInput @ input-shims.js:357
Expected Behavior
No warning should appear.
Steps to Reproduce
git clone https://github.com/aparajita/biometric-auth-demo.git
cd biometric-auth-demo
pnpm install
pnpm dev
- Open localhost:3000
- Open the console
- Turn on verbose logging
- Reload the page
- Look the bottom of the console for a [Violation] warning.
Code Reproduction URL
https://github.com/aparajita/capacitor-biometric-auth-demo
Ionic Info
Ionic:
Ionic CLI : 6.20.1 (/Users/aparajita/Library/pnpm/global/5/.pnpm/@ionic+cli@6.20.1/node_modules/@ionic/cli)
Capacitor:
Capacitor CLI : 3.6.0 @capacitor/android : 3.6.0 @capacitor/core : 3.6.0 @capacitor/ios : 3.6.0
Utility:
cordova-res : 0.15.4 native-run : not installed globally
System:
NodeJS : v18.4.0 (/Users/aparajita/.fnm/node-versions/v18.4.0/installation/bin/node) npm : 8.12.1 OS : macOS Monterey
Additional Information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Added non-passive event listener to a scroll-blocking ...
This solve the problem to me: jQuery.event.special.touchstart = { setup: function( _, ns, handle ){ if ( ns.includes("noPreventDefault") ) ...
Read more >1200 non-passive event listener violations to console
[Bug] Mobile VisualEditor prints ~1200 non-passive event listener violations to console. Closed, ResolvedPublic. Actions.
Read more >Easy fix for: Unable to preventDefault inside passive event ...
1. Remove the need for preventDefault() in the event listener ... The correct way to fix this issue is by finding the event...
Read more >Passive event warnings [63211698] - Visible to Public
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more ...
Read more >[Violation] Added non-passive event listener to a scroll ...
See <URL> jquery.inputmask.bundle.min.js?ver=4.0.0-beta.58:8 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event.
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 FreeTop 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
Top GitHub Comments
Yes, doh! 🫢
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.