ftlabs / fastclick

Polyfill to remove click delays on browsers with touch UIs
MIT License
18.65k stars 3.22k forks source link

Polymer/Shadow DOM not playing nice with FastClick #427

Open lizlux opened 9 years ago

lizlux commented 9 years ago

I can add more steps to reproduce if you'd like, but for now I'll just report what I'm seeing.

I've created a polymer component which uses shadow dom. Clicking on an element inside the component opens a drop-down. With fast-click enabled on a mobile (or emulated) device the click/tap event doesn't fire, and the drop-down isn't opened.

I'm binding the event with the on-click attribute supported by polymer.

Disabling FastClick on my custom element is the work-around.

cvrebert commented 8 years ago

Perhaps the bug lies in Polymer? It does a lot of weird stuff to accomplish what it does.

ccapndave commented 8 years ago

I'm also running into this issue. How did you manage to disable fastclick? I've tried adding a needsclick to my select element, but the drop-down still doesn't get opened.

lizlux commented 8 years ago

Sorry it's been a long time since I worked on this, and I forget exactly what I did to disable fastclick. Wish I could be more helpful.

ccapndave commented 8 years ago

No worries, thanks anyway :)

alubchuk commented 5 years ago

@ccapndave not sure if it's still valid for you but here is how you can disable fastclick on element: https://github.com/ftlabs/fastclick#ignore-certain-elements-with-needsclick