Skip to content

Css :active not fired onTouchStart #53

Open
@Aarbel

Description

@Aarbel

Hi react-fastclick team !

Problem

HTML

<button>
    Hello
</button>

CSS

button:active {
    background-color : red;
}
  • Button:active pseudo-class isn't fired instantly on onTouchStart when react-fastclick is installed.
  • The button:active is fired with a 300ms delay, when the button is hold.
  • If the user taps fast, he doesn't see the style change.

Expected behavior

Css :active pseudo-class is commonly fired on onTouchStart.
We use this pseudo class to make our interface more appealing on mobile devices (we use Cordova). Each time our user touchStart a button, the style instantly changes to make the interface more "reactive".

How to reproduce

How to reproduce :

  • install react-fastclick
  • enjoy tapping on an element with :active pseudo class
  • i use an Iphone, i didn't tried on Android if the problem is similar

How could we fix this issue ?

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions