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

passive event handler #98

Open
CommanderRaiker opened this issue May 2, 2023 · 11 comments
Open

passive event handler #98

CommanderRaiker opened this issue May 2, 2023 · 11 comments

Comments

@CommanderRaiker
Copy link

Hello,

can you update your lib to prevent the following verbose message in edge browser?

coloris.min.js:6 [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

I'm not deep enough into the topic, but I was able to eliminate the message with the following change:

e.addEventListener(t, l)

becomes:

e.addEventListener(t, l, { passive: true})

@mdbassit
Copy link
Owner

mdbassit commented May 3, 2023

I'm unable to reproduce this on the latest version of Microsoft Edge with the latest version of Coloris. What versions were you testing?

In any case, some non-passive touch events are necessary to make the color picker work on mobile devices.

@CommanderRaiker
Copy link
Author

Hello. I got the message at Edge Version 112.0.1722.64

@mdbassit
Copy link
Owner

mdbassit commented May 4, 2023

Again, I am unable to reproduce this warning on Edge version 112.0.1722.68 with the latest version of Coloris. Could you describe the steps to reproduce the issue?

@mdbassit
Copy link
Owner

Any update on this?

@CommanderRaiker
Copy link
Author

CommanderRaiker commented May 15, 2023 via email

@mdbassit
Copy link
Owner

Could you put a link to the page where this warning occurs?

@mdbassit
Copy link
Owner

mdbassit commented Jun 3, 2023

I'm closing this for inactivity.

@mdbassit mdbassit closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2023
@laygir
Copy link

laygir commented Jun 4, 2023

fwiw, just wanted to post this here.
I also read your comment here and on another issue, saying that scroll blocking is necessary, so not posting to complain but to show the warning does come up in the examples site. 🙌

Screenshot 2023-06-04 at 18 10 35

@mdbassit mdbassit reopened this Jun 5, 2023
@mdbassit
Copy link
Owner

mdbassit commented Jun 5, 2023

fwiw, just wanted to post this here. I also read your comment here and on another issue, saying that scroll blocking is necessary, so not posting to complain but to show the warning does come up in the examples site. 🙌

Thank you for reporting this.
This is proving hard to solve as I'm still unable to reproduce this on several machines. Could you provide your operating system and browser version? Also is there a specific set of conditions that trigger this warning or does it always happen for you?

@laygir
Copy link

laygir commented Jun 5, 2023

Hey @mdbassit 👋

Of course, attached a screen recording. I am using Chrome 113.0.5672.126 (Official Build) (arm64) with MacBook M1 Pro on Ventura 13.4. It does happen consistently every time for me.

But I just checked it with a friend who has a company managed laptop with Chrome v114.x.x there I did not see the warning. So it could also be his chrome://flags configured to prevent such warnings since it's managed by a company admin..

Hope this helps 🙌

Screen.Recording.2023-06-05.at.15.31.54.mov

@mdbassit
Copy link
Owner

mdbassit commented Jun 6, 2023

That helps a lot. Thank you so much. I will investigate this further.

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

3 participants