resolves #138 - individual focus styles weren't being applied to text and multiline text input

This commit is contained in:
Matthew Griffith 2019-08-09 23:20:59 -04:00
parent 02e9919a47
commit ee624284a2
2 changed files with 15 additions and 2 deletions

View File

@ -957,7 +957,11 @@ textHelper textInput attrs textOptions =
identity
)
[ Element.width Element.fill
, Internal.htmlClass classes.focusedWithin
, if List.any hasFocusStyle withDefaults then
Internal.NoAttribute
else
Internal.htmlClass classes.focusedWithin
, Internal.htmlClass classes.inputMultilineWrapper
]
++ redistributed.parent
@ -1005,7 +1009,12 @@ textHelper textInput attrs textOptions =
Internal.asEl
Internal.div
(Element.width Element.fill
:: Internal.htmlClass classes.focusedWithin
:: (if List.any hasFocusStyle withDefaults then
Internal.NoAttribute
else
Internal.htmlClass classes.focusedWithin
)
:: List.concat
[ redistributed.parent
, case textOptions.placeholder of

View File

@ -2660,6 +2660,10 @@ renderStyle options maybePseudo selector props =
++ "-fs {"
++ renderedProps
++ "\n}"
, selector
++ "-fs:focus-within {"
++ renderedProps
++ "\n}"
, ".focusable-parent:focus ~ "
++ "."
++ classes.any