fix(suggestion): dropdown can now be closed with Esc (#4380) (#5544)

This commit is contained in:
Ricardo Amaral 2024-08-23 11:26:24 +01:00 committed by Nick the Sick
parent 8d8d999803
commit 84f491ccab
No known key found for this signature in database
GPG Key ID: F575992F156E5BCC
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"@tiptap/suggestion": patch
---
Dropdowns from the suggestion utility couldn't be closed with the `Esc` key

View File

@ -197,7 +197,7 @@ export function Suggestion<I = any, TSelected = any>({
const handleStart = started || (moved && changed)
const handleChange = changed || moved
const handleExit = stopped
const handleExit = stopped || (moved && changed)
// Cancel when suggestion isn't active
if (!handleStart && !handleChange && !handleExit) {