feat: person @mentions edit-mode infrastructure (PR-B1, #362) #369

Merged
marcel merged 26 commits from feat/person-mentions-issue-362-frontend-b1 into main 2026-04-29 08:05:49 +02:00
Showing only changes of commit f0bb1c3163 - Show all commits

View File

@@ -143,6 +143,14 @@ function closePopup() {
clearTimeout(debounceTimer);
}
function handleBlur() {
// Small delay so an option's onmousedown can fire and select before the
// popup unmounts. Without this, clicking a result on the way out would
// race with blur and lose the selection.
setTimeout(() => closePopup(), 150);
onblur?.();
}
function handleKeydown(e: KeyboardEvent) {
if (query === null) return;
@@ -191,7 +199,7 @@ const popupOpen = $derived(query !== null);
oninput={handleInput}
onkeydown={handleKeydown}
onfocus={onfocus}
onblur={onblur}
onblur={handleBlur}
></textarea>
{#if popupOpen}