CompositionInput: Run onBackspace no matter the modifiers

This commit is contained in:
Scott Nonnenberg
2025-03-24 23:35:17 +10:00
committed by GitHub
parent 2e45dbd543
commit e7c6212bce

View File

@@ -817,8 +817,11 @@ export function CompositionInput(props: Props): React.ReactElement {
}, },
Backspace: { Backspace: {
key: 'Backspace', key: 'Backspace',
// We want to be called no matter the state of this key // We want to be called no matter the state of these keys
altKey: null, altKey: null,
ctrlKey: null,
shiftKey: null,
metaKey: null,
handler: (_: RangeStatic, context: Context) => handler: (_: RangeStatic, context: Context) =>
callbacksRef.current.onBackspace(_, context), callbacksRef.current.onBackspace(_, context),
}, },