From e8e93cba56cfccfcbdd166ffe07766d9954804ec Mon Sep 17 00:00:00 2001 From: r-zakarya <82443831+r-zakarya@users.noreply.github.com> Date: Mon, 5 Oct 2026 17:45:34 +0100 Subject: [PATCH] fix(fillbar): la barrette remplit meme quand les raccourcis sont coupes "Autofill with global hotkey" desactive faisait ignorer a la page toute demande, barrette comprise. Delphi dit maintenant d'ou vient la demande ; seuls les raccourcis sont coupes. Co-Authored-By: Claude Opus 5.5 --- delphi-backend/UMainForm.pas | 3 ++- js/app.autofill.js | 6 ++++-- js/app.js | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) 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