-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Toggling a CollapsingHeader in a ComboBox closes the whole ComboBox #335
Comments
This also happens in menu bars, which is quite annoying to say the least. |
Clicking anything in a combobox closes it. Right now comboboxes are more like fold-out menus which are agnostic to their content. The most common contents is So how do we fix it? We could not close the combobox when the user click inside of it, but that would also be annoying ("BUG: combo boxes don't close once I made a selection!"). So we want it to close when the user clicks some (most?) types of widgets, but not others ( Perhaps comboboxes shouldn't be this general. Perhaps the user should provide a list of items, rather than providing an |
I'd be fine with some widgets closing the menus but not others. I can't see any reason anyone would want a nested |
Instead of "significant", what about a "used" flag set when some widget "uses" the event? The following widgets could read that used flag and act or not anyway. In this case, the click would close the combobox only if the click was not used by some inner widget. |
After scouring for a while through the source code, I have a concrete proposal that expands on @msklywenn's idea. We could add a The value of this attribute would then be propagated through If this seems like a reasonable proposal, then I'd be happy to help implement it. |
So... what about this? Is my proposal a good idea? Are there any other ways we could get around this? |
Perhaps this could be solved by re-implementing comboboxes using #543 |
Should be very easy to use this for the |
@vihdzp @msklywenn I also used a propagation system like this to cascade the close command through the menu hierarchy. You have to call a function though when you want the menu to close. But I could imagine widgets triggering this internally when some flag is set. you just need a |
Describe the bug
Putting a CollapsingHeader inside a ComboBox closes the ComboBox whenever you try to toggle the CollapsingHeader
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The CollapsingHeader should be able to open/close without the ComboBox closing
Screenshots
System
OS: Windows10 20H2
The text was updated successfully, but these errors were encountered: