[英]Disable Click Hover/ Double click issue iPad
I have an issue with my web application. 我的Web应用程序有问题。 The issue is that on Safari for iPad I have to click 2 times to actually perform the click on the
<a>
tag. 问题是,在iPad版Safari上,我必须单击2次才能实际单击
<a>
标记。 The first one performs a hover like when you hover with the mouse on desktop. 第一个将执行悬停,就像在桌面上使用鼠标悬停时一样。 I am using AngularJS.
我正在使用AngularJS。 I tried on firefox, it works just fine.
我试过Firefox,它工作正常。 Here is my code :
这是我的代码:
<ul class="navigation">
<li class="navigation-item" [routerLinkActive]="['active']" [routerLinkActiveOptions]="{ exact: true }">
<a [routerLink]="['/']" class="navigation-link" role="button">
menu1
</a>
</li>
<li class="navigation-item" [routerLinkActive]="['active']">
<a [routerLink]="[myRoute]" class="navigation-link" role="button">
menu2
</a>
</li>
<li class="navigation-item" [routerLinkActive]="['active']">
<a [routerLink]="[myRoute2]" class="navigation-link" role="button">
menu3
</a>
</li>
</ul>
I tried adding (onclick)=" " or ng-onclick=" " or style="cursor:pointer" so the hover doesn't trigger but none of this worked. 我尝试添加(onclick)=“”或ng-onclick =“”或style =“ cursor:pointer”,因此悬停不会触发,但是这些都没有起作用。
Thank you for your help 谢谢您的帮助
$('a').on('click touchend', function(e) {
var el = $(this);
var link = el.attr('href');
window.location = link;
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.