-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Polymer Gestures preventing programmed clicks on mobile #5289
Comments
Happens for me too. Another workaround I found: call I’ve also noticed, that ehe check around these lines https://github.com/Polymer/polymer/blob/master/lib/utils/gestures.js#L163-L170 relies on |
Having this issue as well. The gestures module is very intrusive in our app, canceling events and modifying native browser behavior. Is there a way to disable it globally? |
Also experiencing this on a project where we utilize one polymer-reliant web component. Very intrusive and breaks other JS in the project. I haven't found a way to disable this globally. Our work-around in this case will be swapping out the polymer-reliant component for a polymer-free component. |
I've created a stackblitz which demonstrates the issue: https://stackblitz.com/edit/lit-element-example-tfopfl?embed=1&file=index.js I am loading the gestures module, then creating a div which does a programmatic click on a button. On desktop it works, on mobile it doesn't work. This is really a major bug as we can't use a standard browser feature. Is there a way we can at least make this behavior configurable? |
Description
When trying to simulate a click event on input (
input.click()
) from other event listener, Polymer Gestures stops that click event.Live Demo
https://jsfiddle.net/myfrom/rypqaxck/18/
Steps to Reproduce
<input type="file">
as it opens a dialog when clicked)click()
function on the inputExpected Results
Input file is clicked; in case of file input, dialog opens
Actual Results
Nothing happends
Browsers Affected
I could check only on Chrome but I think it should happen on other mobile browsers too.
Versions
Additional information
I did a bit of digging while trying to debug it and found out that it's caused by
mouseCanceller()
function (here).However, I found a workaround:
Instead of calling
input.click()
, sending non-bubbling event will work:I'm not sure if it can be fixed without breaking something else but I wanted to post it at least to share the workaround if someone encounters the same problem 😉
The text was updated successfully, but these errors were encountered: