fix(autofill): refuse a fill while a blocking operation runs

Guarded in autofillHandleRequest, upstream of the single-match versus picker split, so it covers Ctrl+Shift+L/P/T and both outcomes: the picker would open behind the overlay, and a single-match fill would minimise our window mid-operation. Cancels the request so Delphi drops the captured target HWND.
This commit is contained in:
r-zakarya
2026-08-01 18:04:35 +01:00
parent be629b2bcf
commit 03cc7adc25
2 changed files with 13 additions and 0 deletions
+11
View File
@@ -236,6 +236,17 @@ function autofillReportResult(ok) {
async function autofillHandleRequest(windowTitle, kind) {
if (!state.autofillEnabled) return;
// A blocking operation owns the screen (export, sync, rotation). Covers all
// three hotkeys and both outcomes: the multi-match picker would open behind
// the overlay, unreachable, and a single-match fill would minimise our
// window and hand the foreground away mid-operation. cancelAutofill so
// Delphi doesn't keep the captured target HWND for a fill that never comes.
if (typeof isBusy === 'function' && isBusy()) {
Bridge.cancelAutofill();
toast('Busy — try again in a moment', 'warning');
return;
}
if (!state.cryptoKey || state.locked || !state.token) {
// Vault is locked — bring the app to the front so the user can
// unlock immediately, rather than silently no-op'ing the hotkey.