Skip to content

Commit 5ba1b29

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 fb566c4 commit 5ba1b29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ts/components/CompositionInput.dom.tsx

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

551-
if (!blotToDelete) {
551+
if (!blotToDelete || offset === 0) {
552552
return true;
553553
}
554554

0 commit comments

Comments
 (0)