-
Notifications
You must be signed in to change notification settings - Fork 41
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
Cannot disable fastclick on a particular element #54
Comments
I believe if you call What is the issue with having fastclick applied to the label? |
i still need the click event to fire….so prevent default is not an option...
… On 9 Oct 2017, at 09:37, Jake ***@***.***> wrote:
I believe if you call event.preventDefault() in onTouchEnd it should prevent the fastclick.
What is the issue with having fastclick applied to the label?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#54 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA059fRGu39hLiHwBZlaVZJeOZlJghqKks5sqdtXgaJpZM4PyJZ9>.
|
so with my fix and adding the no-fastclick class to the input the following now works as intended:
|
I'm having the same trouble. Some browsers prevent file inputs from being triggered by client code as a security measure. Try triggering a click event in the console using When the library proxies a touch event to the native label |
@simonrobb would you mind opening another issue about this, as although it can be solved by disabling fastclick, it'd be good to see if I can find a fix for this anyway. There shouldn't be any trouble really, as fastclick does not actually trigger any events, it just calls your callback in the touch events and prevents the onClick event. For inputs it simply calls |
@simonro <https://github.com/simonrobb>bb a question to ask yourself is why the library is needed at all. From iOS 8 and >2014 versions of Android, it should not be necessary. My reason for using is because I have had to use UIWebView (not WKWebView) in a cordova app. Fortunately I have since found a way around this and removed the need for it.
I also found that this library causes issues with input[type=select] - the iOS popover appears twice and is somewhat unresponsive and buggy. I’m unsure why and oddly this disable workaround didn’t help in this case, so I have not yet done the changes to the PR as Jake requested - I guess, as Jake suggests, a more complete solution is needed.
… On 18 Oct 2017, at 09:43, Jake ***@***.***> wrote:
@simonrobb <https://github.com/simonrobb> would you mind opening another issue about this, as although it can be solved by disabling fastclick, it'd be good to see if I can find a fix for this anyway.
There shouldn't be any trouble really, as fastclick does not actually trigger any events, it just calls your callback in the touch events and prevents the onClick event. For inputs it simply calls input.focus(), which I guess works for most inputs, but not for files.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#54 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA059T-KJq7byDlRXs4j8NJbL_ZJwsxlks5stbpGgaJpZM4PyJZ9>.
|
I'm having the same trouble like you had sad. Could you tell me how to fix it? thx |
@simonrobb Could you tell me how to fix it ? if you have solved this quesiton. thx |
@shane-xi @simonrobb I had the same trouble too in UIWebView and i solved it. i uninstalled react-fastclick, install fastclick can solved. |
我后来也是干掉了react-fastclick,直接用的fastclick解决的 @zongzi531 |
Need the possibility of disabling fastclick on a specific element.
My particular case was an input type file that is hidden, but the label is used as a button to activate it.
e.g.
pull request coming...
The text was updated successfully, but these errors were encountered: