From 781f0815a8e761db015316ac4614c43433a245b1 Mon Sep 17 00:00:00 2001 From: Cyril Date: Tue, 27 Jan 2026 15:10:22 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(frontend)=20preserve=20typed=20tex?= =?UTF-8?q?t=20after=20@=20on=20escape?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit prevents losing input when closing interlink search --- CHANGELOG.md | 1 + .../custom-inline-content/Interlinking/SearchPage.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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('');