question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: non-passive event listener for 'touchstart' event

See original GitHub issue

Prerequisites

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:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aparajitacommented, Jul 11, 2022

Yes, doh! 🫢

0reactions
ionitron-bot[bot]commented, Aug 13, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found