git.iko.soy/typeable/elm-ui
on master help sign in
add notes for the future
e0d3e84Matthew Griffith
src/Element/Input.elm+6−2
@@ -937,6 +937,10 @@ textHelper textInput attrs textOptions =
937 , Element.height Element.fill
937 , Element.height Element.fill
938 , Internal.htmlClass classes.inputMultiline
938 , Internal.htmlClass classes.inputMultiline
939 , calcMoveToCompensateForPadding withDefaults
939 , calcMoveToCompensateForPadding withDefaults
940+
941+ -- The only reason we do this padding trick is so that when the user clicks in the padding,
942+ -- that the cursor will reset correctly.
943+ -- This could probably be combined with the above `calcMoveToCompensateForPadding`
940 , Element.paddingEach parentPadding
944 , Element.paddingEach parentPadding
941 , Internal.Attr (Html.Attributes.style "margin" (renderBox (negateBox parentPadding)))
945 , Internal.Attr (Html.Attributes.style "margin" (renderBox (negateBox parentPadding)))
942 , Internal.Attr (Html.Attributes.style "box-sizing" "content-box")
946 , Internal.Attr (Html.Attributes.style "box-sizing" "content-box")
@@ -957,8 +961,8 @@ textHelper textInput attrs textOptions =
957 case textInput.type_ of
961 case textInput.type_ of
958 TextArea ->
962 TextArea ->
959 -- textarea with height-content means that
963 -- textarea with height-content means that
960− -- the input element is rendered `inFront` and transparently.
964+ -- the input element is rendered `inFront` with a transparent background
961− -- Then the input text is rendered as the actual element.
965+ -- Then the input text is rendered as the space filling element.
962 Internal.element
966 Internal.element
963 Internal.asEl
967 Internal.asEl
964 Internal.div
968 Internal.div