Skip to content

Commit

Permalink
fix: The list of users in mentions does not disappear when using the …
Browse files Browse the repository at this point in the history
…Shift+Enter
  • Loading branch information
dukenv0307 committed Feb 19, 2024
1 parent 39b575c commit 2aa8ad8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ function SuggestionMention({
suggestionEndIndex = indexOfFirstSpecialCharOrEmojiAfterTheCursor + selectionEnd;
}

const leftString = value.substring(0, suggestionEndIndex);
const newLineIndex = value.lastIndexOf('\n', selectionEnd - 1);
const leftString = value.substring(newLineIndex + 1, suggestionEndIndex);
const words = leftString.split(CONST.REGEX.SPACE_OR_EMOJI);
const lastWord = _.last(words);
const secondToLastWord = words[words.length - 3];
Expand Down

0 comments on commit 2aa8ad8

Please sign in to comment.