marcelodolza / marcelodolza/iziToast

Added no-passive event listener to a scroll-blocking 'touchstart'

Open
#175 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.