iOS Hover Events Fix

iOS devices when programmed to use “hover” with css will often ignore this effect in handheld and touchscreen devices, forcing the user to double-click in order to reveal toggled or hidden content.The below snippet helps correct this.

document.addEventListener("touchstart", function() {},false);

This will allow the user to long-press (or hold) to simulate a hover effect on handheld iOS similar to the behaviour on other handheld devices.

Leave a Reply

katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.