Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Css :active not fired onTouchStart #53

Open
Aarbel opened this issue Oct 6, 2017 · 5 comments · May be fixed by #56
Open

Css :active not fired onTouchStart #53

Aarbel opened this issue Oct 6, 2017 · 5 comments · May be fixed by #56

Comments

@Aarbel
Copy link

Aarbel commented Oct 6, 2017

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 !

@henrysworld
Copy link

Hello, I also encountered the same problem, please ask this question, you have found a solution?

@JakeSidSmith
Copy link
Owner

Hey, sorry, somehow I didn't notice this issue. Will have a look whenever I get a chance. :)

@JakeSidSmith JakeSidSmith linked a pull request Oct 29, 2017 that will close this issue
3 tasks
@JakeSidSmith
Copy link
Owner

@Aarbel could you fork from this branch: #56 and try to reproduce. Send me a link in reply to this issue and let me know what iPhone & version of iOS the issue appears on. I have tried to reproduce on several iPhone simulators, but don't appear to be able to.

@Aarbel
Copy link
Author

Aarbel commented Nov 3, 2017

@JakeSidSmith which iPhone simulator do you use ? Thanks a lot for your corrections, i'll test it next week ;)

@JakeSidSmith
Copy link
Owner

@Aarbel might also be worth trying out the original https://github.com/ftlabs/fastclick as it appears to work nicely with React now. I may end up deprecating this library in favor of ftlabs' fastclick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants