fix(autofill): send the window back to the tray when the picker is dismissed
Cancelling left the window on the desktop, though it had only been restored to ask which entry to fill. Quick-search already hides itself on Esc; this makes the picker symmetric. Applies to all three hotkeys — the capture and the hide both sit on the shared BridgeAutofillRequest / autofill/cancel paths, so full, password-only and TOTP behave identically. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -313,7 +313,7 @@ l'éditeur slideover : créer + éditer une entrée, ajouter/retirer des tags,
|
|||||||
### H9 · retour au tray après un pick dans le picker ✅
|
### H9 · retour au tray après un pick dans le picker ✅
|
||||||
- **ACTION** : app **au tray** → `Ctrl+Shift+L` depuis une autre app sur un titre à plusieurs candidats → le picker sort la fenêtre du tray → choisir une entrée.
|
- **ACTION** : app **au tray** → `Ctrl+Shift+L` depuis une autre app sur un titre à plusieurs candidats → le picker sort la fenêtre du tray → choisir une entrée.
|
||||||
- **ATTENDU** : le remplissage se fait puis l'app **repart au tray**, comme elle est venue.
|
- **ATTENDU** : le remplissage se fait puis l'app **repart au tray**, comme elle est venue.
|
||||||
- **Variantes** : match unique (pas de picker) → reste au tray ; app déjà visible → reste visible ; app **minimisée dans la barre des tâches** → n'est **pas** envoyée au tray (`not Self.Visible` est faux pour une fenêtre iconique) ; picker fermé sans choisir → l'app reste où elle est et le hotkey suivant n'hérite pas de l'état capturé.
|
- **Variantes** : match unique (pas de picker) → reste au tray ; app déjà visible → reste visible ; app **minimisée dans la barre des tâches** → n'est **pas** envoyée au tray (`not Self.Visible` est faux pour une fenêtre iconique) ; picker fermé par Esc sans choisir → l'app **repart au tray** elle aussi (symétrique de quick-search, qui se cache sur Esc) et le hotkey suivant n'hérite pas de l'état capturé.
|
||||||
- **Historique** : seul le chemin quick-search capturait « était cachée » (`LWasHidden`) et le faisait remonter via `hide_after` ; JS n'envoie jamais ce paramètre depuis le picker d'autofill, donc l'app restait sur le bureau. Capturé désormais côté Delphi dans `BridgeAutofillRequest`, au moment du hotkey — après, le picker a déjà détruit l'information.
|
- **Historique** : seul le chemin quick-search capturait « était cachée » (`LWasHidden`) et le faisait remonter via `hide_after` ; JS n'envoie jamais ce paramètre depuis le picker d'autofill, donc l'app restait sur le bureau. Capturé désormais côté Delphi dans `BridgeAutofillRequest`, au moment du hotkey — après, le picker a déjà détruit l'information.
|
||||||
|
|
||||||
### H7 · combo déjà pris par une autre application ✅
|
### H7 · combo déjà pris par une autre application ✅
|
||||||
|
|||||||
@@ -1087,9 +1087,14 @@ begin
|
|||||||
if FAutofillTargetHWND <> 0 then
|
if FAutofillTargetHWND <> 0 then
|
||||||
SetForegroundWindow(FAutofillTargetHWND);
|
SetForegroundWindow(FAutofillTargetHWND);
|
||||||
FAutofillTargetHWND := 0;
|
FAutofillTargetHWND := 0;
|
||||||
// Cancelled: the window stays wherever the user left it, and the captured
|
// The window only came out of the tray to show the picker, so dismissing it
|
||||||
// state must not leak into the next hotkey.
|
// puts it back — same as quick-search, which hides on Esc too. Done after
|
||||||
FAutofillHotkeyWasHidden := False;
|
// handing focus to the target above.
|
||||||
|
if FAutofillHotkeyWasHidden then
|
||||||
|
begin
|
||||||
|
FAutofillHotkeyWasHidden := False;
|
||||||
|
FBridge.MinimizeToTray;
|
||||||
|
end;
|
||||||
LogLine('Autofill cancelled (no match or dismissed)');
|
LogLine('Autofill cancelled (no match or dismissed)');
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user