Skip to content

Do not set touchend listeners to passive - #4962

Merged
dfreedm merged 2 commits into
masterfrom
passive-touch-no-touchend
Dec 4, 2017
Merged

Do not set touchend listeners to passive#4962
dfreedm merged 2 commits into
masterfrom
passive-touch-no-touchend

Conversation

@dfreedm

@dfreedm dfreedm commented Nov 29, 2017

Copy link
Copy Markdown
Member

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

@TimvdLippe TimvdLippe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SFTM

Comment thread lib/utils/gestures.html Outdated
}
if (gd._count === 0) {
let options = !isMouseEvent(dep) && PASSIVE_TOUCH();
let options = !isMouseEvent(dep) && dep !== 'touchend' && PASSIVE_TOUCH();

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