Hello,
I have looked and although there are similar posts, I am not sure I can see an answer to this exact query and googling it hasn’t given me a definitive fix, so hopefully someone here may have some input.
I have built a basic SVG election map that has 6 areas, with links to URLs from each area and it applies a :hover style to change the fill and stroke for each of the areas.
It works fine on the desktop and in most mobile devices (ignoring the hover on mobile which is fine). However it does invoke the known IoS mobile device issue where you need to ‘click’ twice, to activate the link, the first time shows the hover style, the second activates the link.
I have also tried another version where there are no :hover styles related to the objects but the issue persists. I have also tried styling the areas inline rather than with a separate css but that made no difference.
Any ideas or thoughts greatly appreciated. This is my first SVG map so I could be missing something simple.
Him,
Here is a link to the original SVG and also a second one I have created that doesn’t reference the #id’s with the hover css change - however that doesn’t seem to be removing the double click issue either.
Both those maps work on my iphone ok but they do need a double click (although they don’t need a double click if you return or move to another item).
I don’t think there is an easy way around the 300ms delay as it has been discussed in detail. The best discussion seems to be here:
The script at the end of the article is mentioned on a few places but I have not tested it.
I tend to think that the delay is there for a reason and should I want to scroll the page I don’t want a link activated straight away especially on a mobile with a slow expensive connection