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

[button] programmatic clicks don't work on mobile browsers when combined with polymer #19

Closed
LarsDenBakker opened this issue May 3, 2019 · 3 comments
Labels
bug Something isn't working external Related to external dependency or tool

Comments

@LarsDenBakker
Copy link
Contributor

LarsDenBakker commented May 3, 2019

The polymer gestures modules prevents programmatic clicks on mobile browsers. This is due to the fact that their event detection mechanism doesn't correctly detect the click events.

There is an open issue Polymer/polymer#5289 but I don't know if it will be solved anytime soon.

The lion project doesn't officially have anything to do with polymer, but we use lion-web and polymer in hybrid applications.

Possible solutions I can think of:

  • Call window.Polymer.Gestures.resetMouseCanceller(); before calling .click();
  • Ensure that the button we call .click() on is a child of ing-button, so that the detection works properly
  • Fire input.dispatchEvent(new MouseEvent('click', { bubbles: false })) instead of a click

Any other ideas?

@LarsDenBakker LarsDenBakker changed the title [button] programmatic clicks are problematic with polymer [button] programmatic clicks are don't work on mobile browsers when combined with polymer May 3, 2019
@LarsDenBakker LarsDenBakker changed the title [button] programmatic clicks are don't work on mobile browsers when combined with polymer [button] programmatic clicks don't work on mobile browsers when combined with polymer May 3, 2019
@LarsDenBakker
Copy link
Contributor Author

Fixing this in Polymer would be the proper fix. Let's see if this gets accepted: Polymer/polymer#5533

@bashmish bashmish added bug Something isn't working external Related to external dependency or tool labels May 23, 2019
@bashmish
Copy link
Contributor

Since the fix has been merged in Polymer, I'm closing this. Thanks for fixing this for everyone 🌞

@bashmish
Copy link
Contributor

Small update: the fix for 2.x was merged on 13 May and was released in Polymer 2.8.0 on 24 June.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external Related to external dependency or tool
Projects
None yet
Development

No branches or pull requests

2 participants