From b6c1e881be8ed8b2534a9fe5b1797caf93d06bdb Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Tue, 7 Jan 2025 17:34:01 +1100 Subject: [PATCH] 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. --- .../javascripts/discourse/components/chat-composer-dropdown.gjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.gjs index 44f33a79dbf..e57e0e1d8c4 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.gjs @@ -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(); }