slmgc/react-hint

Unable to close tooltip on touch devices

lauriejones opened this issue · 5 comments

Hi Vladimir,

Thanks very much for the component. It works well and is much simpler to style than most tooltip options out there.

We are having some trouble on mobile / touch devices in our app. Tooltips open fine, but we have no way to close them. Tapping on another link opens that tooltip and closes the previously open one, but we are not able to toggle the visibility of one tooltip by tapping again, or tapping somewhere else on the screen.

The example page also has this issue.

We were going to look into using the onClick on the trigger to somehow check if it is a repeat click and set the target back to null. But we thought it would be best to check with you first to see if there is a way you would handle this.

Thanks again, and we hope to hear from you soon.

Laurie

slmgc commented

Hi Laurie,

Thanks for letting me know. I'll try to look into this issue today. Btw, on which devices/OSes/browsers you were able to reproduce the issue?

Thanks for responding so quickly!

We were looking on iOS, iPhone 6 using Chrome.

slmgc commented

Ok, I was able to reproduce this bug. It works fine on Android devices, but doesn't work on iPhones. I'll try to figure out a way to resolve the issue.

Cool, thank you. We have had to go with something else so there is no urgency from us. Feel free to solve at your own leisure (or not!).

Thanks again for getting back to me so quickly 👍

Hi is there an option to have the tooltips to not persist on mobile, as the fix to this issue seems to have cause them to persist?