marcelodolza / marcelodolza/iziToast
Added no-passive event listener to a scroll-blocking 'touchstart'
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
When I was running a test application on iPhone 6/7/8 mode in Chrome 74, I could show a toast message with no problems, but there was a warning in the 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. See https://www.chromestatus.com/feature/5745543795965952
This warning message was triggered on following line.
https://github.com/marcelodolza/iziToast/blob/7a63b735cb83df5c979b6799795986dcfa010aab/src/js/iziToast.js#L1250
As far as I understand it is not a big issue, I just wanted to let you know of this.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/js/iziToast.js line 1250, where the reported touchstart listener triggers Chrome's non-passive warning. Reproduce the warning in the referenced iPhone mode using Chrome DevTools, then verify that the warning is gone without breaking touch scrolling or toast behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100