Skip to content
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

perf(input): passive event listener for touch start events #25610

Merged
merged 3 commits into from
Jul 14, 2022
Merged

Conversation

sean-perkins
Copy link
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

When using an input with scroll assist or an input with a clear action, there is violations that are logged in the dev console:

[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event.
Consider marking event handler as 'passive' to make the page more responsive.

Issue URL: #25599

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev-build: 6.1.14-dev.11657566839.18ed2481

Since the bug associated with this PR does not have functional problems, it is difficult to know the affected changes, if any. I confirmed that the clear action continues to work in browser and on device. I also confirmed the scroll assist does not appear to have regressed. The originally reporter also confirmed the dev-build.

@github-actions github-actions bot added the package: core @ionic/core package label Jul 11, 2022
@sean-perkins sean-perkins marked this pull request as ready for review July 11, 2022 20:35
@sean-perkins sean-perkins requested a review from a team as a code owner July 11, 2022 20:35
core/src/components/input/input.tsx Outdated Show resolved Hide resolved
@liamdebeasi
Copy link
Contributor

Could also consider this a perf instead of a fix since it should help with scrolling performance in some cases

@sean-perkins
Copy link
Contributor Author

@liamdebeasi I like the idea of targeting at perf since there isn't broken/buggy behavior reported 👍

@sean-perkins sean-perkins changed the title fix(input): passive event listener for touch start events perf(input): passive event listener for touch start events Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants