Skip to content

Commit

Permalink
fix(suggestion): sometimes a suggestion would not show up (#4380)
Browse files Browse the repository at this point in the history
  • Loading branch information
nperez0111 committed Aug 21, 2024
1 parent c076a0e commit 5129bd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rare-trainers-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tiptap/extension-mention": patch
---

Mentions would sometimes not show up if one was declined and a new one followed afterward. Was introduced by PR (#4380)
2 changes: 1 addition & 1 deletion packages/suggestion/src/suggestion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export function Suggestion<I = any, TSelected = any>({
const stopped = prev.active && !next.active
const changed = !started && !stopped && prev.query !== next.query

const handleStart = started
const handleStart = started || (moved && changed)
const handleChange = changed || moved
const handleExit = stopped

Expand Down

0 comments on commit 5129bd4

Please sign in to comment.