emerald-web-framework
emerald-web-framework copied to clipboard
[Sling-button] button's label is clickable even though button is disabled
I'm submitting a:
[x] bug report [ ] feature request [ ] support request
Current behavior:
If you click a disabled
Expected behavior:
A disabled sling-button should never issue an onclick event, no matter where it's clicked.
I'd like to handle this and open a Pull Request, @caiomdias.
I think we could handle it in two different ways:
- Add a
disabled
attr to all slot elements; - Handle button's
click
internally and stop event propagation in case it isdisabled
.
Any suggestions @caiomdias? I'm kinda new with these web components, so there might be a better approach.
Hey @StanleySathler! Sorry for the delay.
I think the second suggestion is the best one to follow. Fell free to implement the best way you can.
Tell us if you need any help.