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

Allow configuring cancelling synthetic click behavior #5533

Merged

Conversation

LarsDenBakker
Copy link
Contributor

@LarsDenBakker LarsDenBakker commented May 3, 2019

Fixes #5289

The polymer gestures module cancels synthetic mouse clicks fired by old mobile browsers. This is no longer necessary (see https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away).

The cancellation detection incorrectly cancels programmatic clicks from javascript directly following a touch action. I added a failing test which demonstrates this behavior. If you run the test in chrome with device simulation enabled, the test would fail if the synthetic click events option is set to true.

This PR adds an option to allow configuring this behavior, leaving the default behavior intact to avoid breaking changes.

If this change is accepted, could we backport this to the Polymer 2 branch as well?

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.

I am okay for this. Let's see what the others say before merging.

test/unit/gestures.html Outdated Show resolved Hide resolved
@LarsDenBakker
Copy link
Contributor Author

LarsDenBakker commented May 4, 2019

@TimvdLippe Thanks! I also created the 2.x version: #5536

@LarsDenBakker
Copy link
Contributor Author

@sorvell @kevinpschaaf @azakus could you take a look at this?

Copy link
Member

@dfreedm dfreedm left a comment

Choose a reason for hiding this comment

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

LGTM

@dfreedm dfreedm merged commit 971d32d into Polymer:master May 10, 2019
@LarsDenBakker
Copy link
Contributor Author

@azakus is it possible to release this as well as #5536 ? :)

lucamilanesio pushed a commit to GerritCodeReview/gerrit that referenced this pull request Apr 21, 2020
This config enabled is really for legacy mobile browser support,
this is no longer needed, so lets disable it.

This also fixes file uploads in mobiles.

See Polymer/polymer#5533

Change-Id: I2144b848a892e6b908dcc153fed42b9223c06272
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.

Polymer Gestures preventing programmed clicks on mobile
4 participants