polymer-gestures not getting triggered on iOS Safari

286 views
Skip to first unread message

akhile...@gmail.com

unread,
Jun 6, 2014, 2:51:00 AM6/6/14
to polym...@googlegroups.com
Try out this sample on iOS Safari: http://jsbin.com/poracihi/2/edit

The "tap" event is getting triggered on all other desktop and android browsers.

Eric Bidelman

unread,
Jun 6, 2014, 11:48:25 AM6/6/14
to Akhilesh Gupta, Daniel Freedman, polymer-dev
+daniel


On Thu, Jun 5, 2014 at 11:51 PM, <akhile...@gmail.com> wrote:
Try out this sample on iOS Safari: http://jsbin.com/poracihi/2/edit

The "tap" event is getting triggered on all other desktop and android browsers.

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/136b7b0b-41bd-4e19-8827-18832979cbf4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Freedman

unread,
Jun 6, 2014, 12:59:49 PM6/6/14
to Eric Bidelman, Akhilesh Gupta, polymer-dev

I'm pretty sure this is related to https://github.com/Polymer/ShadowDOM/issues/452

Akhilesh

unread,
Jun 6, 2014, 8:40:54 PM6/6/14
to Daniel Freedman, Eric Bidelman, polymer-dev
I took the master branch and tested the fix to this issue. Unfortunately, the events are still not getting triggered on iOS Safari. 

Daniel Freedman

unread,
Jun 6, 2014, 10:37:07 PM6/6/14
to Akhilesh Gupta, Eric Bidelman, polymer-dev

Please make sure you have touch-action attribute set.

Akhilesh

unread,
Jun 7, 2014, 9:40:06 PM6/7/14
to Daniel Freedman, Eric Bidelman, polymer-dev
I tried with touch-action too, but still no event callback. Is this working for you guys? 
BTW, I never had to specify the touch-action with Polymer#0.2.4 and it used to work fine.

Daniel Freedman

unread,
Jun 8, 2014, 4:59:16 PM6/8/14
to Akhilesh, Eric Bidelman, polymer-dev
I'm pretty sure this is a regression caused by https://github.com/Polymer/polymer-gestures/commit/6379ad4dc32d8af192f987d1c4f7bb5f22cde534.

In the absence of touch listeners (which are added by setting the touch-action attribute), iOS safari uses the presence of mouse listeners on the target node to determine if events should be sent.

Setting mouse listeners in firefox makes screen readers report all polymer elements as "clickable", which is very annoying.

I have an idea to use the presence of gesture event listeners to add touch and mouse events to satisfy both constraints, but I need a bit more time to play with them.

In the meantime you can set touch-action="auto" on <body> and that should at least get you all the events. 

Akhilesh

unread,
Jun 8, 2014, 6:50:59 PM6/8/14
to Daniel Freedman, Eric Bidelman, polymer-dev
Yeah that solved the issue for me. In fact, I tried with touch-action="auto" with Polymer#0.3.1 and that worked too. Not sure what I missed earlier.

Thanks Daniel for your help!!
Reply all
Reply to author
Forward
0 new messages