Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upRe-rendering can cause an input field to lose focus. #3
Comments
valrus
referenced this issue
Dec 21, 2015
Closed
Text box loses focus after every keypress on Windows Firefox #14
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
evancz
May 11, 2016
Member
Sorry this did not get attention til now! The Graphics.* modules now live in evancz/elm-graphics so I am trying to get stuff migrated over there. The input elements did not make the leap though, so the fix is to use HTML and SVG for this sort of stuff.
|
Sorry this did not get attention til now! The |
evancz
closed this
May 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jwmerrill commentedNov 14, 2014
In this example, typing in the input field causes it to immediately lose focus.
The issue is apparently that whenever the number of elements in a flow changes, all the elements in the flow are re-rendered. Re-rendering an input causes it to lose focus.
Avoiding re-rendering input fields unnecessarily would mean this bug would manifest less often, but the robust solution is to make sure that re-rendering restores focus.
Some discussion and a work around for this particular case here:
https://groups.google.com/forum/#!topic/elm-discuss/RzGDnQKh5eg