ng-click not working on tablet
Asked Answered
J

1

6

I have a ng-click on a div-tag. This works on desktop in every browser. But when I test it on an iPad (ios7) i'ts not working. Strangely enough. When I change the div to an a-tag. It works. But this is not an option, because that breaks other things in my app.

<div class="ytBlockNativeControles" ng-click="background || YtPlayer.togglePlay();" ng-class='{"pause":YtPlayer.playing == 1, "play":YtPlayer.playing == 0}'>
    <img src="{{YtPlayer.poster}}" alt="" class="ytPoster" ng-if="YtPlayer.poster != ''">
    <div class="ytOverlayPlayBtn imgReplace" ng-show="!YtPlayer.playing && !background && !YtPlayer.initiallyHidePlayBtn">Play</div>
</div>

When I add the ng-touch module. And I click the div, then the ng-click-active class is added. But the ng-click is not executed.

Jacynth answered 17/7, 2014 at 15:39 Comment(1)
+1 Seeing the same problem using angular strap's datepicker on iOS7. This has been vexing me for days -- thanks for at least giving me a reference point on this. Changing from button to a works for me too, although it's not an option for me either.Kahler
E
0

to run events in tablet and mobile devices, you must integrate this module based hammer.js

https://github.com/wzr1337/angular-gestures

Here more information:

http://www.ng-newsletter.com/posts/angular-on-mobile.html

Esque answered 28/5, 2015 at 16:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.