git.iko.soy/typeable/elm-ui
on master help sign in
resolve #131 - placeholder is a nbsp if no placeholder is given. Prevents the input from losing focus suddenly
commitbdf65d7202157d7aed92e62d7ff4fd524e70651c authorMatthew Griffith <mdg.griffith@gmail.com> dateMon 29 Jul 2019, 19:28 (7 years ago) parent1041330
1 file changed+4−1
src/Element/Input.elm+4−1
src/Element/Input.elm+4−1
@@ -976,7 +976,10 @@ textHelper textInput attrs textOptions =
976976 (if textOptions.text == "" then
977977 case textOptions.placeholder of
978978 Nothing ->
979− []
979+ -- Without this, firefox will make the text area lose focus
980+ -- if the input is empty and you mash the keyboard
981+ [ Element.text "\u{00A0}"
982+ ]
980983
981984 Just place ->
982985 [ renderPlaceholder place