Skip to content

Commit b35a643

Browse files
committed
Fix onBackspace handling of multiline messages with emojis or mentions
When onBackspace occurs with the cursor at the beginning of a line in a multiline message, it now shortcircuits out to the default backspace handler. This will prevent bespoke handling of emoji and mention deletions to erroneously be executed.
1 parent 69aa0b3 commit b35a643

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ts/components/CompositionInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ export function CompositionInput(props: Props): React.ReactElement {
545545
let blotToDelete = leaf[0];
546546
const offset = leaf[1];
547547

548-
if (!blotToDelete) {
548+
if (!blotToDelete || offset === 0) {
549549
return true;
550550
}
551551

0 commit comments

Comments
 (0)