FIX: Ensure popups from the chat composer dropdown gain focus (#30613)

When inserting anything from the chat composer dropdown, any popups opened weren't properly focussed.

This was due to the default behaviour of the dropdown menu closing, which tries to return the focus to the original triggering element. This would normally be the correct behaviour, but here we want the menu to close in the background, handing focus off to the popup, instead.
This commit is contained in:
Gary Pendergast 2025-01-07 17:34:01 +11:00 committed by GitHub
parent ec3b6d57c2
commit b6c1e881be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,7 @@ import DMenu from "float-kit/components/d-menu";
export default class ChatComposerDropdown extends Component {
@action
onButtonClick(button, closeFn) {
closeFn();
closeFn({ focusTrigger: false });
button.action();
}