style-elements icon indicating copy to clipboard operation
style-elements copied to clipboard

Focus area is 100 % of it's parent not just the input box + label.

Open AionDev opened this issue 9 years ago • 2 comments

I added a orange background to the hole text input. this is the parent - with orange - it contains the feedback too - and it responds to click

Code looks something like this:

Input.text DefaultInput
        ([ width << px <| toFloat 80
         , height <| px 36
         , paddingLeft 15
         ]
        )
        { onChange = NoOpWithText
        , value = "0"
        , label =
            Input.placeholder
                { text = "pret"
                , label =
                    el InputLabelStyle [ verticalCenter ] (text "lei")
                        |> el None [ vary MakeRed True ]
                        |> Input.labelRight
                }
        , options =
            [ "longer feedback here."
                |> text
                >> el FeedbackText [ vary InfoStyle True ]
                >> Input.errorBelow
            ]
        }
        |> el None [ vary MakeOrange True, width content ]

I expect that the onFocus event will be triggered only when clicking on the input box - or on the label -- but not when clicking on the parent containing everything including the feedback. Thanks 😃

AionDev avatar Sep 23 '17 20:09 AionDev

I am having the exact same issue. Is there a way around this for now?

littleStudent avatar Oct 13 '17 06:10 littleStudent

@littleStudent i coudn't find a way, I left it like this for now, but if you rely need it maybe use html node and convert back using html function- pain in the ass i know 😁

AionDev avatar Oct 15 '17 17:10 AionDev