Skip to content

Use passive: true in touchmove events#14

Open
musaffa wants to merge 1 commit intonickschot:masterfrom
musaffa:master
Open

Use passive: true in touchmove events#14
musaffa wants to merge 1 commit intonickschot:masterfrom
musaffa:master

Conversation

@musaffa
Copy link

@musaffa musaffa commented Mar 20, 2020

Chrome Lighthouse is suggesting to pass passive: true to touchmove event listener.

Chrome Lighthouse is suggesting to pass passive: true to touchmove event listener.
@nickschot
Copy link
Owner

There was a reason that I did not pass that option there but I can't remember. I'll have to dig in a little and get back to you on this one!

@nickschot
Copy link
Owner

If this gets merged we should also put it in https://github.com/nickschot/ember-gesture-modifiers

@nickschot
Copy link
Owner

I figured out the reason this was there was because we have the prevent scroll functionality which cannot be combined with a passive event listeren on touch move. However, I am unsure if this is actually needed. It will definitely be better to make the touchmove follow the same options as the other events. I'm gonna tinker a bit with what I want the setup to look like and get back to you.

@nickschot
Copy link
Owner

nickschot commented Aug 8, 2020

ember-gesture-modifiers was updated with a fix for this behaviour: https://github.com/nickschot/ember-gesture-modifiers/pull/11/files Passive will be true by default, false if the preventScroll argument is passed. Let me know if you still use this specific addon (I'd recommend using ember-gesture-modifiers instead) & I'll fix it here too.

@musaffa
Copy link
Author

musaffa commented Aug 8, 2020

I'll migrate to ember-gesture-modifiers. Thanks.

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

Successfully merging this pull request may close these issues.

2 participants