Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(md): add space escaping to inline md emoji picker (#2552)
Seamus83f509448829
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx b/js/app/packages/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsxindex d3377ef7d6..be9a9de427 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/menu/EmojiMenu.tsx@@ -71,6 +71,9 @@ export function EmojiItem(props: {export function EmojiMenu(props: EmojiMenuProps) {const [mountSelection, setMountSelection] = createSignal<Selection | null>();const [selectedIndex, setSelectedIndex] = createSignal(0);+ const [escapeSpaceState, setEscapeSpaceState] = createSignal<+ 'start' | 'single' | 'double' | null+ >('start');const [virtualHandle, setVirtualHandle] = createSignal<VirtualizerHandle>();const [menuAvailableHeight, setMenuAvailableHeight] = createSignal<number | undefined@@ -105,6 +108,7 @@ export function EmojiMenu(props: EmojiMenuProps) {if (props.menu.isOpen()) {setMountSelection(document.getSelection());setSelectedIndex(0);+ setEscapeSpaceState('start');} else {setMountSelection(null);}@@ -187,6 +191,24 @@ export function EmojiMenu(props: EmojiMenuProps) {}},onClose: closeMenu,+ onSpace: () => {+ switch (escapeSpaceState()) {+ case 'double':+ case 'start':+ closeMenu();+ return true;+ case 'single':+ setEscapeSpaceState('double');+ return false;+ case null:+ setEscapeSpaceState('single');+ return false;+ }+ return false;+ },+ onOtherKey: () => {+ setEscapeSpaceState(null);+ },});const focusOut = () => {