You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[selectmenu] button click behavior when the popup is open #486
Currently, in Chrome Canary, if a <selectmenu>'s button is clicked when the popup is open, the popup closes while the button is pressed and re-opens when the button is released.
open-ui_486.mp4
But I think it is preferable to close the popup on a button click when it is open, like <select>. What do you think?
(I don't know whether this is a specification or a Chromium implementation.)
I think I'm in favor of redefining (or likely just more-carefully defining) the popup light dismiss behavior to not light dismiss if the triggerpopup-based trigger element for any popup is clicked. I can't see what the use case would be for wanting that click to hide and then immediately re-open the popup. A third possibility would be that re-clicking the trigger element hides and does not re-show the popup? But that feels fairly opinionated to be a default behavior. Perhaps for that use case, you'd avoid triggerpopup and hook things up with JS instead?
The Open UI Community Group just discussed [selectmenu] button click behavior when the popup is open #486.
The full IRC log of that discussion
<hdv> Topic: [selectmenu] button click behavior when the popup is open #486
<hdv> github: https://github.com//issues/486
<hdv> dandclark: we wanted the behavior if popup is open and you click on a button, we wanted the correct behavior for it to close and stay closed… we want to avoid popups close and open again
<hdv> dandclark: the order does matter
<JonathanNeal> yay on the previous toggle discussion helping assist this discussion
<hdv> masonf: I think we agreed on the behavior for it to toggle… spec wise we'll have to figure out how we do it, both in lightdismiss part of the spec, that clicking on the button is a lightdismiss behavior, agree it is something to spec
<hdv> dandclark: sounds good
Just to highlight the discussion here and on #508: the tentative conclusion we reached is that the default behavior for declaratively invoked popups is for the popup to "toggle". I.e. clicking the button will open the popup if it is currently closed, and close it if it's already open.
We've now discussed this behavior in even more detail (e.g. see #523). The resolved behavior is that togglepopup toggles when the button is pressed, openpopup just opens, and hidepopup just hides. I'm going to close this issue.
Activity
dandclark commentedon Mar 16, 2022
Thanks @luncheon for pointing this out. I agree it would make more sense to match the behavior of
<select>.The draft at https://open-ui.org/components/select is ambiguous about what the behavior should be, because it depends on whether the button's handling the click or the listbox's light dismiss behavior happens first. The order of these isn't specified.
After resolving on the desired behavior we could probably just add a note about which way it should work (and update the prototype accordingly).
dandclark commentedon Mar 16, 2022
The decision here should probably be generalized to apply to the interaction between
triggerpopupand light dismiss as defined in https://github.com/mfreed7/popup#declarative-trigger-the-triggerpopup-attribute (moving soon to open-ui via #490).mfreed7 commentedon Mar 31, 2022
I think I'm in favor of redefining (or likely just more-carefully defining) the popup light dismiss behavior to not light dismiss if the
triggerpopup-based trigger element for any popup is clicked. I can't see what the use case would be for wanting that click to hide and then immediately re-open the popup. A third possibility would be that re-clicking the trigger element hides and does not re-show the popup? But that feels fairly opinionated to be a default behavior. Perhaps for that use case, you'd avoidtriggerpopupand hook things up with JS instead?css-meeting-bot commentedon Apr 7, 2022
The Open UI Community Group just discussed
[selectmenu] button click behavior when the popup is open #486.The full IRC log of that discussion
<hdv> Topic: [selectmenu] button click behavior when the popup is open #486<hdv> github: https://github.com//issues/486
<hdv> dandclark: we wanted the behavior if popup is open and you click on a button, we wanted the correct behavior for it to close and stay closed… we want to avoid popups close and open again
<hdv> dandclark: the order does matter
<JonathanNeal> yay on the previous toggle discussion helping assist this discussion
<hdv> masonf: I think we agreed on the behavior for it to toggle… spec wise we'll have to figure out how we do it, both in lightdismiss part of the spec, that clicking on the button is a lightdismiss behavior, agree it is something to spec
<hdv> dandclark: sounds good
mfreed7 commentedon Apr 7, 2022
Just to highlight the discussion here and on #508: the tentative conclusion we reached is that the default behavior for declaratively invoked popups is for the popup to "toggle". I.e. clicking the button will open the popup if it is currently closed, and close it if it's already open.
mfreed7 commentedon Apr 27, 2022
We've now discussed this behavior in even more detail (e.g. see #523). The resolved behavior is that
togglepopuptoggles when the button is pressed,openpopupjust opens, andhidepopupjust hides. I'm going to close this issue.