Skip to content

Commit

Permalink
Update SuggestionMention.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
allroundexperts authored Mar 15, 2024
1 parent ad79f49 commit 6736a26
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function SuggestionMention(
// Used to store the selection index of the last inserted mention
const suggestionInsertionIndexRef = useRef<number | null>(null);

// Used to detect if the selection has changed since the last suggestion calculation
// Used to detect if the selection has changed since the last suggestion insertion
// If so, we reset the suggestionInsertionIndexRef
const hasSelectionChanged = !(selection.end === selection.start && selection.start === suggestionInsertionIndexRef.current);
if (hasSelectionChanged) {
Expand Down

0 comments on commit 6736a26

Please sign in to comment.