diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-08-15 21:41:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-15 21:41:44 +0300 |
commit | 314c380fc4684a0959e2c4c40800823a9d958ca6 (patch) | |
tree | 199c64ed03a935d58c1c4e5d9cec5bafc7b6451c | |
parent | f2892779da97d18d96125a66d90a3d31fd81fb2d (diff) | |
download | voidsky-314c380fc4684a0959e2c4c40800823a9d958ca6.tar.zst |
don't override backspace if alt or meta key (#8855)
-rw-r--r-- | src/view/com/composer/text-input/TextInput.web.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
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 |