Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't use both "hover" and "outsideClick" triggers on Angular Bootstrap Tooltips

I'm using Angular Bootstrap and want to have my tooltips trigger using a "hover" on desktop and "click" on mobile devices which can't hover but also have the tooltips close if you click outside the tooltip. I set it to tooltip-trigger="hover outsideClick" since "outsideClick" is now a supported trigger (https://github.com/angular-ui/bootstrap/tree/master/src/tooltip/docs), however this breaks the tooltip completely so even the hover doesn't work.

<span class="glyphicon glyphicon-info-sign" tooltip-trigger="hover outsideClick" uib-tooltip="Tooltip text here"></span>

Is there any way to make these work together?

If I just use tooltip-trigger="hover click" it's decent, but on mobile I can only close the tooltip by clicking the item again, versus being able to click elsewhere on the page to close it.

like image 888
think.arthur Avatar asked Dec 21 '15 04:12

think.arthur


1 Answers

Have you tried tooltip-trigger="mouseenter outsideClick"? It seems likehover is not mentioned in the doc.

like image 118
yeahwhat Avatar answered Oct 05 '22 22:10

yeahwhat