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

Do not set touchend listeners to passive #4962

Merged
merged 2 commits into from
Dec 4, 2017
Merged

Conversation

dfreedm
Copy link
Member

@dfreedm dfreedm commented Nov 29, 2017

touchend listeners do not need to be passive to enable more performant
scrolling.

With this change, most of the tradeoffs with enabling
passiveTouchGestures disappear, leaving only the inability to control
scrolling from track, down, and move gestures.

Fixes #4961

`touchend` listeners do not need to be passive to enable more performant
scrolling.

With this change, most of the tradeoffs with enabling
`passiveTouchGestures` disappear, leaving only the inability to control
scrolling from `track`, `down`, and `move` gestures.

Fixes #4961
dfreedm added a commit that referenced this pull request Nov 29, 2017
`touchend` listeners do not need to be passive to enable more performant
scrolling.

With this change, most of the tradeoffs with enabling
`passiveTouchGestures` disappear, leaving only the inability to control
scrolling from `track`, `down`, and `move` gestures.

1.x port of #4962
@dfreedm dfreedm requested a review from sorvell November 29, 2017 20:20
Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SFTM

@@ -481,7 +481,7 @@
gobj[dep] = gd = {_count: 0};
}
if (gd._count === 0) {
let options = !isMouseEvent(dep) && PASSIVE_TOUCH();
let options = !isMouseEvent(dep) && dep !== 'touchend' && PASSIVE_TOUCH();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move isMouseEvent and touchend check into PASSIVE_TOUCH()

@TimvdLippe
Copy link
Contributor

@azakus Since #4963 has been merged, I suppose this one can as well?

@dfreedm dfreedm merged commit b311a77 into master Dec 4, 2017
@dfreedm dfreedm deleted the passive-touch-no-touchend branch December 4, 2017 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants