diff --git a/delphi-backend/UMainForm.pas b/delphi-backend/UMainForm.pas index eae9da9..1365346 100644 --- a/delphi-backend/UMainForm.pas +++ b/delphi-backend/UMainForm.pas @@ -2267,7 +2267,8 @@ begin FAutofillClock := TStopwatch.StartNew; WebBrowser.ExecuteJavaScript( 'if(window.Bridge&&typeof Bridge.onAutofillRequest==="function")' + - 'Bridge.onAutofillRequest("' + LTitle + '","' + LKind + '")'); + 'Bridge.onAutofillRequest("' + LTitle + '","' + LKind + '",' + + BoolToStr(FBridge.LastRequestFromBar, True).ToLower + ')'); LogLine('Autofill ' + IfThen(FBridge.LastRequestFromBar, 'fill bar', 'hotkey') + ' (' + LKind + ') — foreground: "' + ATitle + '"'); end; diff --git a/js/app.autofill.js b/js/app.autofill.js index 6a51bac..15a8744 100644 --- a/js/app.autofill.js +++ b/js/app.autofill.js @@ -235,8 +235,10 @@ function autofillReportResult(ok) { // Called by Bridge.onAutofillRequest when a hotkey fires. // kind: 'full' = Ctrl+Shift+L (user + Tab + pwd) ; 'password' = Ctrl+Shift+P. -async function autofillHandleRequest(windowTitle, kind) { - if (!state.autofillEnabled) return; +async function autofillHandleRequest(windowTitle, kind, fromBar) { + // L'option ne coupe que les RACCOURCIS (« Autofill with global hotkey ») : + // la barrette est un geste explicite, elle remplit quand meme. + if (!state.autofillEnabled && !fromBar) return; // A blocking operation owns the screen (export, sync, rotation). Covers all // three hotkeys and both outcomes: the multi-match picker would open behind diff --git a/js/app.js b/js/app.js index aeac77d..ef24293 100644 --- a/js/app.js +++ b/js/app.js @@ -117,8 +117,8 @@ const Bridge = (() => { // Called by Delphi when a hotkey fires. windowTitle = foreground // window title at hotkey time. kind = "full" (user+Tab+pwd) or // "password" (password only — for step-2 forms, unlock screens). - onAutofillRequest(windowTitle, kind) { - autofillHandleRequest(windowTitle, kind || 'full'); + onAutofillRequest(windowTitle, kind, fromBar) { + autofillHandleRequest(windowTitle, kind || 'full', !!fromBar); }, // Called by Delphi after cmd://autofill/execute with whether the