The groupfocus should really have a way to disable the behavior that is automatically closes if it is clicked outside. A similar functionality exists for popups, in the form of the “This popup can’t be closed by pressing ‘Esc’” option.
Example for usage:
This is a continuation of the example in the following post:
I want to create an input with a dropdown menu for a user to choose from a list of dynamic types, or type their own. Since I cannot do this with the standard searchbox, the next best option is to create a Groupfocus to serve as the dropdown. In order to get the groupfocus to show when the correct input is focused and hide otherwise, two workflows are used:
-Do when a condition is true → Every time → Input type is focused*: Show groupfocus dropdown
-Do when a condition is true → Every time → Input type is not focused*: Hide groupfocus dropdown
Unfortunately, this causes a problem with the groupfocus: the focus on the element is triggered on mousedown, which causes the groupfocus to show. HOWEVER, the groupfocus’ built-in check for losing its focus happens on mouseup, which detects that the input is in focus and not the groupfocus, causing it to close. The result of this is that clicking on the input causes the groupfocus to flash briefly before remaining closed. You can get it to stay if you use the ‘tab’ key to switch focus to the input, but clicking on the input again causes the groupfocus to hide.
The next step was to attempt to use a floating group to serve the same purpose. While you can’t anchor a floating group to an element, it could still work, and avoids the previous issue. One problem though: the input form is in a popup, and floating groups can’t be put in popups. While they can still be shown and hidden, they appear underneath the popup.
This could all be avoided by giving us the option to disable the hide-on-lose-focus behavior. Or at least allow floating groups to be shown in popups. It looks like people have been asking for that one for at least a couple of years now:
*A side note: “input type is focused” is not a valid workflow condition in bubble (though it really should be). As a proxy, I create a transparent group that is hidden by default, and have a condition on the group that says “When input type is focused, this group is visible”. I then use the group’s visibility as the workflow condition.
Credit to Run workflow when input is clicked or focused - #5 by fayewatson for this solution