don't override backspace if alt or meta key (#8855)

This commit is contained in:
Samuel Newman
2025-08-15 21:41:44 +03:00
committed by GitHub
parent f2892779da
commit 314c380fc4
@@ -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