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

Implement fast click to remove delay on mobile web browser #2753

Closed
wildfiremedia opened this issue Dec 20, 2014 · 16 comments
Closed

Implement fast click to remove delay on mobile web browser #2753

wildfiremedia opened this issue Dec 20, 2014 · 16 comments

Comments

@wildfiremedia
Copy link

Will be nice is react has this feature that improve responsiveness similar to FastClick by FT Labs.

@RickWong
Copy link

If you just load the regular FastClick then that should fix the browser delay at the DOM event level, which the React event system sits on top. Right?

@OscarGodson
Copy link

@RickWong no. FastClick doesn't work with React because React has all faux events. I wish it did support it tho. Now we have to include a click helper mixin everywhere. Its kinda gross.

@sophiebits
Copy link
Collaborator

Odd – I was under the impression that fastclick works properly with React.

@OscarGodson
Copy link

@spicyj other people have run into it not working. Asking around about it everyone has their own hacks around it. http://stackoverflow.com/questions/24335821/can-i-fastclick-reactjs-running-in-cordova

@iamstarkov
Copy link

I ended up using react-tap-event-plugin

@geekyme
Copy link

geekyme commented May 19, 2015

@iamstarkov how are you using react-tap-event-plugin to solve the problem?

@iamstarkov
Copy link

yep

@geekyme
Copy link

geekyme commented May 19, 2015

How are you using it?

@iamstarkov
Copy link

The same way as stated in readme of react-tap-event-plugin

@geekyme
Copy link

geekyme commented May 19, 2015

I added the library though and didn't see any noticeable change.

I'm using the commonjs syntax to require and inject the plugin.

Sent from my iPhone

On 19 May 2015, at 7:10 pm, Vladimir Starkov notifications@github.com wrote:

The same way as stated in readme of react-tap-event-plugin


Reply to this email directly or view it on GitHub.

@iamstarkov
Copy link

It’s not enough to inject it, you alse need to use onTouchTap={this._handleTouchTap} attr

@geekyme
Copy link

geekyme commented May 19, 2015

nvm. following this answer immediately made fastclick work for me. http://stackoverflow.com/a/30316754/1770280

I'm not sure whether all edge cases are covered but most of the problems I was facing were fixed by that few lines of code.

@frankandrobot
Copy link

Does the react-tap-event-plugin also work with desktop? (i.e., one solution to rule 'em all?)

@jimfb
Copy link
Contributor

jimfb commented Feb 10, 2016

Most mobile browsers have already fixed this. https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away?hl=en

Also, as per #436 (comment), we are probably going in the opposite direction and pulling the tap event plugin out of the core.

@jimfb jimfb closed this as completed Feb 10, 2016
@cpbotha
Copy link

cpbotha commented Jul 20, 2016

On our two IOS 9.3 test ipads, doing width=device-width as documented at https://developer.apple.com/library/mac/releasenotes/General/WhatsNewInSafari/Articles/Safari_9_1.html#//apple_ref/doc/uid/TP40014305-CH10-SW8 does not work on our two IOS 9.3 test iPads (where it DOES work on Android Chrome).

width=device-width not working on IOS 9.3 was confirmed in this discussion: ftlabs/fastclick#450

For this reason, we are still using fastclick.js with our react.js app (see http://stackoverflow.com/questions/24335821/can-i-fastclick-reactjs-running-in-cordova/30316754#30316754 ). fastclick only activates where necessary.

@infacq
Copy link

infacq commented May 24, 2017

fastClick cannot get along with onClick event. I have to switch to react-tap-event-plugin

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

No branches or pull requests

10 participants