-
Notifications
You must be signed in to change notification settings - Fork 125
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
Keyboard Focus when changing Postcode #38
Comments
I meant to say last night when I logged this... I'm more interested in how this might be fixed, than actually seeing it fixed. Would the PostcodeChanged event updating the Postcode be removed and using plain old javascript or a CSS text transform, or is there a React / Fable / Elmish way to do it. |
Looks related to: elmish/react#12 |
Mmmm. Probably the way you would have to do it is manually figure out the index of which key had changed, and then on the way out set the index of the textbox in the view function. I'm not sure how to do that off the top of my head though! Happy to see what the other issue solution is :-) |
Looking at the comments on that linked Issue, it would be solved in the next version of Elmish React or by using |
Hmm, |
Fixed with latest PR. |
When typing in a postcode the focus is always set to the end of the text box.
This looks to be because changing the text goes through the update loop and sets the text to upper-case, which in turn updates the text moving the selection to the end.
I've had a look at fixing this by setting
selectionStart
andselectionEnd
in the view, but I can't get it to work properly.The text was updated successfully, but these errors were encountered: