admin管理员组文章数量:1414438
I have tried different forms of tooltip, and they all work fine in Chrome or in browsers, on android etc..
But when it es to iPad, iPhone and safari (sometimes even chrome) I get the problem that tooltip on a button will suddenly require 2 clicks to press the button. One click brings up the tooltip and the other press the button.
<button href="#mail-wrapper"
class="book-button book-text-button col-std-mail"
ng-click="vm.mailButton=true;"
uib-popover="Send Mail to Tenant"
popover-trigger="'mouseenter'">
<md-icon class="material-icons book-material" aria-label="Mail" role="img">mail</md-icon>
MAIL
</button>
Does anyone have a suggestion to a tooltip ponent for angular, jquery, js which works on safari / iOS?`
I have tried different forms of tooltip, and they all work fine in Chrome or in browsers, on android etc..
But when it es to iPad, iPhone and safari (sometimes even chrome) I get the problem that tooltip on a button will suddenly require 2 clicks to press the button. One click brings up the tooltip and the other press the button.
<button href="#mail-wrapper"
class="book-button book-text-button col-std-mail"
ng-click="vm.mailButton=true;"
uib-popover="Send Mail to Tenant"
popover-trigger="'mouseenter'">
<md-icon class="material-icons book-material" aria-label="Mail" role="img">mail</md-icon>
MAIL
</button>
Does anyone have a suggestion to a tooltip ponent for angular, jquery, js which works on safari / iOS?`
Share Improve this question asked Feb 26, 2018 at 8:52 torbenrudgaardtorbenrudgaard 2,5819 gold badges35 silver badges59 bronze badges 2- Could you fix that? – Borzh Commented May 8, 2018 at 12:42
- Nope - we ended up using just the HTML standard tooltip – torbenrudgaard Commented May 13, 2018 at 22:41
1 Answer
Reset to default 4I see the same behavior, using bootstrap4 and tooltips on links.
<script>$(function () {$('[data-toggle="tooltip"]').tooltip()})</script>
<a href="mylink" data-toggle="tooltip" data-placement="bottom" title="my tooltip text">my link or icon</a>
Result: Tap 1 triggers the tooltip only. The link is not followed. A 2nd tap is required to triggers the link.
Don't ask me why, but I finally "solved" it using this configuration:
- add the following CSS class to my link cursor:pointer
- Add some config to the tooltip call:
trigger:"hover"
anddelay:{"show":400,"hide":800}
Complete solution is
<script>$(function () {
$('[data-toggle="tooltip"]').tooltip({trigger:"hover",
delay:{"show":400,"hide":800}})})</script>
<a href="mylink" class="perso-IOSpointer" data-toggle="tooltip" data-placement="bottom" title="my tooltip text">my link or icon</i></a>
I tried to change the delay an here are my observation on several iPhones
- no delay: 2 taps required
"show":100
: 2 taps required"show":300
: 1 tap required
I finally set it to 400ms and it seems to be fine.
本文标签: javascriptTooltips not working as expected on SafariiPadStack Overflow
版权声明:本文标题:javascript - Tooltips not working as expected on SafariiPad - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744683536a2619561.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论