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

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

Open
camilosampedro opened this issue May 13, 2019 · 1 comment
Open

Comments

@camilosampedro
Copy link

camilosampedro commented May 13, 2019

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.

$DOM.toast.addEventListener('touchstart', function(e) {

As far as I understand it is not a big issue, I just wanted to let you know of this.

@eduard2014
Copy link

eduard2014 commented May 18, 2019

Hi, I tested this change and it seems to work.

$DOM.toast.addEventListener('touchstart', function (e) {
    drag.startMoving(this, that, settings, e);
}, { passive: true });

And this is another one:

$DOM.buttonClose.setAttribute('aria-label', 'Close');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants