chinchang / hint.css

A CSS only tooltip library for your lovely websites.

Home Page:https://kushagra.dev/lab/hint/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work in Safari on iOS 9.2

Alexx-G opened this issue · comments

commented

Basically are working only hints from the grid (which shows different position of hint).

I think the problem is that other hints are applied on an <a> tag without href attribute.
In some Safari versions <a> tag without href attribute isn't recognized as a clickable element.
Adding href="#" to those hints fixes this behavior for me.

So, it would be nice to fix the demo and mention this in readme/docs.

This is still the case with iOS 12. When using the .hint class on a <span> or other element that is not a link the tooltip doesn't show.

One solution is to add cursor: pointer to the element that has the .hint class. Maybe the library should do that by default, or as @Alexx-G pointed out, change the readme/docs.

@chinchang what do you think? I can open a PR with either solution.

@Alexx-G @afgomez I tried with a SPAN as well as an ANCHOR without href. Both seem to be working in iOS. Would be great if you can provide a demo link for the bug, possibly on Codepen.

@chinchang - for example, see project demo page with SVG icons - hint are not working for me on IOS12
While both options 1) a tag with href and 2) cursor:pointer fix hint opening, hint won't close for me on outside click (IOS12, SVG icon)