Fix search bar losing focus under specific conditions, mainly that when the search takes more than 50ms, causing results to be emptied, with a file priorly focused, was causing breadcrumbs to get focused. (reactivity is hard)

This commit is contained in:
2026-02-05 00:07:45 +00:00
parent f578a50007
commit 4eefe83072
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -210,7 +210,7 @@ watchEffect(() => {
} }
}) })
watchEffect(() => { watchEffect(() => {
if (!props.documents.length && store.cursor) { if (!props.documents.length && store.cursor && !store.query) {
store.cursor = '' store.cursor = ''
focusBreadcrumb() focusBreadcrumb()
} }
+1 -1
View File
@@ -162,7 +162,7 @@ watchEffect(() => {
} }
}) })
watchEffect(() => { watchEffect(() => {
if (!props.documents.length && store.cursor) { if (!props.documents.length && store.cursor && !store.query) {
store.cursor = '' store.cursor = ''
focusBreadcrumb() focusBreadcrumb()
} }