Skip to content

Commit 567a1d5

Browse files
D3OXYznoraka
authored andcommitted
fix(web): prevent number-key shortcuts from hijacking input in focused editor (pingdotgg#1810)
1 parent cf4cfe8 commit 567a1d5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ const ComposerPendingUserInputCard = memo(function ComposerPendingUserInputCard(
100100
if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) {
101101
return;
102102
}
103-
if (target instanceof HTMLElement && target.isContentEditable) {
103+
if (
104+
target instanceof HTMLElement &&
105+
target.closest('[contenteditable]:not([contenteditable="false"])')
106+
) {
104107
return;
105108
}
106109
const digit = Number.parseInt(event.key, 10);

0 commit comments

Comments
 (0)