fix(messages): keep cursor in search input after clearing query
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-03-20 11:26:02 +01:00
parent 48cda78939
commit 95a6385e7b
2 changed files with 4 additions and 2 deletions

View File

@ -463,6 +463,7 @@
url.searchParams.delete('q');
}
url.searchParams.delete('page');
url.hash = 'search';
window.location.href = url.toString();
}
@ -483,7 +484,7 @@
});
// Focus at end of text after page reload
if (input.value) {
if (input.value || window.location.hash === '#search') {
input.focus();
input.setSelectionRange(input.value.length, input.value.length);
}

View File

@ -400,6 +400,7 @@
url.searchParams.delete('q');
}
url.searchParams.delete('page');
url.hash = 'search';
window.location.href = url.toString();
}
@ -418,7 +419,7 @@
doSearch('');
});
if (input.value) {
if (input.value || window.location.hash === '#search') {
input.focus();
input.setSelectionRange(input.value.length, input.value.length);
}