2

I have created a simple FastClick implementation. Issue I will be describing occurs with FastClick but since it seems more like a browser bug, i decided to create non-FastClick version to represent the issue.

https://jsbin.com/fofaxiniya/1

Test this on iOS device or simulator running iOS 8.1 or up.

Scenario:

  1. at least iOS 8.1 or up
  2. A simple page with two buttons with active and hover states.
  3. touchend handler that creates a synthetic click event and disables the original click event.

Steps to reproduce:

On the device or simulator,

  1. Click on the first button
  2. Click on the second button that removes itself from DOM on click
  3. The hover state of first button gets triggered.

Why is this annoying?

Because of this weird behaviour, combination of FastClick and Single page application leads to some button randomly being hovered on navigation. Which is definitely unwanted behavior.

I am already considering removing all the hover styles from touch devices. But if I could actually target the problem itself, which is getting rid of the random hover from happenning, that would be great.

Any attempt to shed some light on this will be highly appreciated. :)

Dennis Jamin
  • 398
  • 1
  • 10
Prashant
  • 7,340
  • 2
  • 25
  • 24
  • 1
    I was able to reproduce this issue on iOS 9.0 and 9.3 as well using the xcode simulator. I have updated your question accordingly. – Dennis Jamin Apr 12 '16 at 09:20

0 Answers0