Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input.slider doesn't respond to mouseOver #332

Open
tankorsmash opened this issue Jan 17, 2022 · 1 comment
Open

Input.slider doesn't respond to mouseOver #332

tankorsmash opened this issue Jan 17, 2022 · 1 comment
Labels
has-ellie This is a bug and has an ellie which demonstrates it.

Comments

@tankorsmash
Copy link

Ellie: https://ellie-app.com/gr66j7s7SkLa1

Expected behavior
When I mouse over the 'thumb' or the slider itself, the background should change color, like it does for the text right after it.

Versions

  • OS: Windows 10 x64
  • Browser: Chrome
  • Browser Version: 97.0.4692.71
  • Elm Version: 0.19.1
  • Elm UI Version [e.g. ]: 1.1.8
elm_ui_slider_mouseover.mp4
@github-actions github-actions bot added the has-ellie This is a bug and has an ellie which demonstrates it. label Jan 17, 2022
@tankorsmash
Copy link
Author

display logic from the ellie to save a click:

main =
    Element.layout [] content


content =
    Element.column [ width fill, centerY, spacing 30 ]
        [ --background and mouseOver don't respond to user input
          Input.slider
            [ width fill
            , height fill
            , Element.mouseOver [ Background.color <| rgb 0 0 0 ]
            , Background.color <| rgb 0 1 0
            ]
            { onChange = Noop
            , label = Input.labelRight [ Element.width (Element.px 250) ] <| text "no BG Color change"
            , min = 0
            , max = 1.0
            , step = Just 0.00001
            , thumb =
                -- thumb mouseover doesn't seem to respond to user input either
                Input.thumb
                    [ width <| Element.px 20
                    , height <| Element.px 20
                    , Background.color <| rgb 0 0 1
                    , Element.mouseOver [ Background.color <| rgb 0 0 0 ]
                    ]
            , value = 0.5
            }
        , --background and mouseOver DO respond to user input
          el
            [ width fill
            , height fill
            , Background.color <| rgb 0 1 0
            , Element.mouseOver [ Background.color <| rgb 1 0 0 ]
            ]
          <|
            text "bg does change"
        ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-ellie This is a bug and has an ellie which demonstrates it.
Projects
None yet
Development

No branches or pull requests

1 participant