A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
fix(app): keep the caret after inserted emoji (#3007)
Hampus12417a6942e7
diff --git a/fluxer_app/src/features/lexical/composer/LexicalComposerInput.tsx b/fluxer_app/src/features/lexical/composer/LexicalComposerInput.tsxindex e0db0d537..a7aa5e0b3 100644--- a/fluxer_app/src/features/lexical/composer/LexicalComposerInput.tsx+++ b/fluxer_app/src/features/lexical/composer/LexicalComposerInput.tsx@@ -588,7 +588,12 @@ const ComposerInner = ({if (disabledRef.current) {return false;}- selectLastSelectionOrEnd();+ const selection = $getSelection();+ if ($isRangeSelection(selection)) {+ $setSelection(selection.clone());+ } else {+ selectLastSelectionOrEnd();+ }return false;},COMMAND_PRIORITY_LOW,