TypeScript
fix(web): prevent number-key shortcuts from hijacking input in focused editor (#1810)
Ishan5467d11980e2
diff --git a/apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx b/apps/web/src/components/chat/ComposerPendingUserInputPanel.tsxindex 98aff58b0dd..3b4093e3801 100644--- a/apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx+++ b/apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx@@ -100,7 +100,10 @@ const ComposerPendingUserInputCard = memo(function ComposerPendingUserInputCard(if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) {return;}- if (target instanceof HTMLElement && target.isContentEditable) {+ if (+ target instanceof HTMLElement &&+ target.closest('[contenteditable]:not([contenteditable="false"])')+ ) {return;}const digit = Number.parseInt(event.key, 10);