(frontend) re-focus toolbar on shortcut when already open

allow keyboard shortcut to return focus to the emoji toolbar without closing it
This commit is contained in:
Cyril
2026-02-25 08:25:18 +01:00
parent de33926a14
commit fcd998390d
@@ -49,7 +49,15 @@ export const ReactionsToggle = () => {
useRegisterKeyboardShortcut({
id: 'reaction',
handler: () => setIsOpen((prev) => !prev),
handler: () => {
if (isOpen) {
document
.querySelector<HTMLElement>('[role="toolbar"] button')
?.focus()
} else {
setIsOpen(true)
}
},
})
const sendReaction = async (emoji: string) => {