How to remove tooltip after clicking on the button?
emaillenin opened this issue · comments
Lenin commented
The tooltip doesn't automatically disappear after the button is clicked:
Can be reproduced on https://kazzkiq.github.io/balloon.css/ too.
I could reproduce this only with Chrome 80.0.3987.149 on Mac OS 10.14.6.
Works fine with other browsers in the same OS.
Claudio Holanda Jr. commented
This is because by default Balloon.css also triggers on :focus
states. Sometimes after you click a button, it remais focused.
To prevent this behavior you can use the data-balloon-nofocus
attribute. E.g.:
<!-- Will NOT appear on focus -->
<button aria-label="Hey!" data-balloon-pos="up" data-balloon-nofocus></button>
locness3 commented
If you use nofocus
though, it won't appear when navigating with keyboard.