Skip to content

Conversation

@gonfunko
Copy link
Contributor

@gonfunko gonfunko commented Jan 8, 2026

The basics

The details

Resolves

Fixes #9542

Proposed Changes

This PR updates (conditional)Bind to take an additional optional parameter corresponding to the addEventListener options argument. This allows us to specify whether touchstart and wheel events are or are not passive. Passive events are those which will never call preventDefault(); in that case, performance can be improved because the browser can run the event handler asynchronously, whereas if there is a possibility of preventDefault() being called, the browser needs to run the whole event handler before scrolling or responding to the touch in case the event handler prevents it, which causes jank commensurate with the complexity of the event handler.

Chrome has started notifying about this in the console, so this also cleans that up. There is still some logging about touchstart in the advanced playground, but it seems that that's coming from one of its dependencies.

@gonfunko gonfunko requested a review from a team as a code owner January 8, 2026 17:54
@gonfunko gonfunko requested a review from maribethb January 8, 2026 17:54
@github-actions github-actions bot added the PR: fix Fixes a bug label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-passive wheel event listener warning when both move.wheel and zoom.wheel are enabled

3 participants