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

Focus on input when (+) clicked. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rektide
Copy link

@rektide rektide commented Apr 27, 2017

This enhancement is designed to make it easier to add a new location. After a user clicks (+) action, the toggleModal handler queues up the firing of a focus call to the text input element.

Please let me know if there's a different implementation pattern you'd prefer or other changes.

Great demo. Really love seeing some small code and some Push. Together is even better!

This enhancement is designed to make it easier to add a new location. After a
user clicks (+) action, the toggleModal handler queues up the firing of
a focus call to the text input element.
@rektide
Copy link
Author

rektide commented Apr 27, 2017

I'm not 100% on how best to insure the sequencing of the modal render happening then the focus occurring. That in particular could have better implementation possibilities than what I'm trying to do here.

@vaneenige
Copy link
Owner

I've actually had this working during development yet I took it out because I didn't like the way the keyboard opened during the animation on mobile. On desktop I really feel this is useful and it doesn't interrupt any animation.

I'm also not sure how the sequencing works best and I've never used the setTimeout(fn, 0). I'll have a look at this later with your implementation in mind. More people have requested this feature so thanks for taking the time! 👍

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 this pull request may close these issues.

2 participants