From 314c380fc4684a0959e2c4c40800823a9d958ca6 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 15 Aug 2025 21:41:44 +0300 Subject: don't override backspace if alt or meta key (#8855) --- src/view/com/composer/text-input/TextInput.web.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/view/com/composer/text-input/TextInput.web.tsx') diff --git a/src/view/com/composer/text-input/TextInput.web.tsx b/src/view/com/composer/text-input/TextInput.web.tsx index f76c07036..cb7ed194a 100644 --- a/src/view/com/composer/text-input/TextInput.web.tsx +++ b/src/view/com/composer/text-input/TextInput.web.tsx @@ -220,7 +220,11 @@ export const TextInput = React.forwardRef(function TextInputImpl( textInputWebEmitter.emit('publish') return true } - if (event.code === 'Backspace') { + + if ( + event.code === 'Backspace' && + !(event.metaKey || event.altKey || event.ctrlKey) + ) { const isNotSelection = view.state.selection.empty if (isNotSelection) { const cursorPosition = view.state.selection.$anchor.pos -- cgit 1.4.1