fix(suggestion): sometimes a suggestion would not show up (#4380) (#5531)

This commit is contained in:
Nick Perez 2024-08-21 08:51:04 +02:00 committed by GitHub
parent c076a0e3bb
commit 8a55cdd2c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -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