Skip to content

Child input not focusing on touch events #116

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

Closed
dunckr opened this issue Dec 1, 2015 · 8 comments
Closed

Child input not focusing on touch events #116

dunckr opened this issue Dec 1, 2015 · 8 comments

Comments

@dunckr
Copy link

dunckr commented Dec 1, 2015

Thanks for making this library it has been really helpful for us.

We have found an issue with child input events not focusing on touch events. To reproduce:

<Draggable zIndex={100} {...drags}>
   <input type="text" placeholder="I cannot be focused" />
</Draggable>
  • Turn on mobile mode/spoof touch events
  • Click on the input
  • Input never receives focus

Example here on the top right

It is a problem with the ghost click hack on onMouseDown. This prevents the event from propagating to the input. As this is to fix another issue I'm not too what is the best way to handle it.

We are overriding the onMouseDown function using the reference to Draggable in our componentDidMount and ignoring the ghost click hack.

Thanks

@xrado
Copy link

xrado commented Jan 6, 2016

+1

@STRML STRML closed this as completed in df5a9d5 Feb 11, 2016
STRML added a commit that referenced this issue Feb 11, 2016
@STRML
Copy link
Collaborator

STRML commented Feb 11, 2016

Gave up on ghost click handling entirely - too many gotchas, too many weird mobile browsers.

@berkaytheunicorn
Copy link

Did you ever fixed the issue or found a workaround? @STRML

@STRML
Copy link
Collaborator

STRML commented Sep 9, 2016

I believe we removed the ghost click handling. Is this still an issue for
you on the latest version?

On Sep 9, 2016 8:20 AM, "Berkay Sargın" [email protected] wrote:

Did you ever fixed the issue or found a workaround? @STRML
https://github.com/STRML


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#116 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABJFP1Q8pW9bDpAr2bOksUZ6rbhctgyUks5qoV0IgaJpZM4GsOSf
.

@berkaytheunicorn
Copy link

not tested yet I will test and get back to you. ;) thanks

@adtm
Copy link

adtm commented Sep 14, 2017

Has it been solved? Because I still encounter this problem with not selecting the input

@sag1v
Copy link

sag1v commented Sep 26, 2017

this is still an open issue, you can't focus inputs nested inside Draggable (not only on TouchEvents)

@dcorb
Copy link

dcorb commented Feb 23, 2018

Solved with the "cancel" prop? #314

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

7 participants