diff --git a/CHANGELOG.md b/CHANGELOG.md index c4d59f85..eee6de14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to - 🐛(frontend) add fallback for unsupported Blocknote languages #1810 - 🐛(frontend) fix emojipicker closing in tree #1808 - 🐛(frontend) display children in favorite #1782 +- 🐛(frontend) preserve typed text after @ on escape #1833 ### Removed diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-inline-content/Interlinking/SearchPage.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-inline-content/Interlinking/SearchPage.tsx index 47428e75..8027b2e4 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-inline-content/Interlinking/SearchPage.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-inline-content/Interlinking/SearchPage.tsx @@ -122,8 +122,8 @@ export const SearchPage = ({ const handleKeyDown = (e: KeyboardEvent) => { if (e.key === 'Escape') { e.preventDefault(); - // Keep the trigger character ('@' or '/') in the editor when closing with Escape - closeSearch(trigger); + // Keep the trigger character and typed text in the editor when closing with Escape + closeSearch(`${trigger}${search}`); } else if (e.key === 'Backspace' && search.length === 0) { e.preventDefault(); closeSearch('');