mirror of
https://github.com/suitenumerique/docs
synced 2026-04-21 13:37:20 +00:00
🐛(frontend) preserve typed text after @ on escape
prevents losing input when closing interlink search
This commit is contained in:
parent
325c7d9786
commit
781f0815a8
2 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -122,8 +122,8 @@ export const SearchPage = ({
|
|||
const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {
|
||||
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('');
|
||||
|
|
|
|||
Loading…
Reference in a new issue