elm-ui
elm-ui copied to clipboard
transparent button still issues onPress message
Un-expected behavior is that a transparent button still issues an event if you click on it. Easy enough to work around, but not what's indicated in the docs.
https://ellie-app.com/3CFndNgGLWya1
Expected behavior
According to the docs transparent elements ought to ignore mouse events.
Versions
- OS: nixos
- Browser: firefox
- Browser Version: 62.0.03
- Elm Version 0.19.0
- Elm UI Version 1.1.0
This happens on Safari Version 12.0.1, macOS 10.14.1. So most likely an elm-ui bug.
This works :
transparent : Element.Attribute msg
transparent =
Html.Attributes.style "visibility" "hidden"
|> Element.htmlAttribute
Also happens with elm-ui 1.1.5. #bug #has-ellie
I am seeing this in elm-ui 1.1.8 in both Firefox and Chromium. The transparent class added by elm-ui attaches opacity: 0 to the element. It seems like it should also/instead add visibility: hidden to prevent mouse events?
I'll be happy to provide an up-to-date Ellie if that helps, but updating the elm-ui version in @bburdette's Ellie above shows that the problem persists.
Is there a recommended workaround?