Skip to content

Commit

Permalink
Merge pull request #36792 from dukenv0307/fix/35518
Browse files Browse the repository at this point in the history
fix: The list of users in mentions does not disappear when using the Shift+Enter
  • Loading branch information
jasperhuangg authored Feb 20, 2024
2 parents 3126658 + 2aa8ad8 commit 64572e9
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 64572e9

Please sign in to comment.