Can't prevent event bubbling when clicking away from a Select component #27961
Labels
status: expected behavior
Does not imply the behavior is intended. Just that we know about it and can't work around it
support: Stack Overflow
Please ask the community on Stack Overflow
Note: This may have a similar source issue to #25578, but the problem itself is a bit different, so I chose to open a new bug report.
Current Behavior 😯
See the current demo
I have a div which includes a Checkbox and a Select dropdown implemented with a ClickAwayListener.
The div wrapping both those elements should behave in such a way that if you click anywhere within it, the checkbox should be toggled. Of course the exception is if you click on the Select, at which point nothing should happen to the checkbox and instead, the select dropdown should open or close as needed.
I've prevented the event propagation when opening and selecting items from the checkbox, but if I click away from it, the checkbox toggles regardless, even if away from the div.
Expected Behavior 🤔
Once the checkbox is opened I should be able to click away from it and have it not trigger the checkbox, specially if the click isn't even on the div.
Steps to Reproduce 🕹
Demo
Steps:
You should be able to close the dropdown without toggling the checkbox.
The text was updated successfully, but these errors were encountered: