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
bdf65d7Matthew Griffith
src/Element/Input.elm+4−1
@@ -976,7 +976,10 @@ textHelper textInput attrs textOptions =
976 (if textOptions.text == "" then
976 (if textOptions.text == "" then
977 case textOptions.placeholder of
977 case textOptions.placeholder of
978 Nothing ->
978 Nothing ->
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}"
979− []
982+ ]
980
983
981 Just place ->
984 Just place ->
982 [ renderPlaceholder place
985 [ renderPlaceholder place