mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 05:42:41 +08:00
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:
parent
ec3b6d57c2
commit
b6c1e881be
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user