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

🐛 Subscriptions: Stops stopping propagation of click events #26702

Merged
merged 5 commits into from
Feb 11, 2020

Conversation

ChrisAntaki
Copy link
Contributor

Stopping the propagation of click events broke the amp-bind extension. This PR uses a new method to ensure click events are only handled once by the amp-subscriptions extension. Basically, an additional property, specific to amp-subscriptions, is added to the event when it is first handled, and the handler bails if it is present on a subsequent call.

I plan to test this PR across a variety of devices/browsers using the PR deploy tool described here:
https://github.com/ampproject/amp-github-apps/blob/master/pr-deploy/README.md

@ChrisAntaki
Copy link
Contributor Author

This works with Chrome's mobile emulation. Now I'm testing it with real mobile devices

@jpettitt
Copy link
Contributor

LGTM but please have @dvoytenko take a look as well to confirm the approach is ok within AMP as a whole

@erwinmombay erwinmombay merged commit 315d430 into ampproject:master Feb 11, 2020
erwinmombay pushed a commit that referenced this pull request Feb 11, 2020
* Stops stopping propagation of click events

* Add test

* Creates const and uses array accessor for surrogate property on click events
erwinmombay pushed a commit that referenced this pull request Feb 11, 2020
* Stops stopping propagation of click events

* Add test

* Creates const and uses array accessor for surrogate property on click events
erwinmombay pushed a commit that referenced this pull request Feb 14, 2020
* Stops stopping propagation of click events

* Add test

* Creates const and uses array accessor for surrogate property on click events
erwinmombay pushed a commit that referenced this pull request Feb 18, 2020
* Stops stopping propagation of click events

* Add test

* Creates const and uses array accessor for surrogate property on click events
rcebulko pushed a commit that referenced this pull request Feb 19, 2020
* Stops stopping propagation of click events

* Add test

* Creates const and uses array accessor for surrogate property on click events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants