Skip to content

Use passive: true in touchmove events#14

Open
musaffa wants to merge 1 commit into
nickschot:masterfrom
musaffa:master
Open

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

Conversation

@musaffa

@musaffa musaffa commented Mar 20, 2020

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Owner

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

@nickschot

Copy link
Copy Markdown
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

nickschot commented Aug 8, 2020

Copy link
Copy Markdown
Owner

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

musaffa commented Aug 8, 2020

Copy link
Copy Markdown
Author

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