fix autofill: stop filling when no visible password field on page

Prevents autofill from filling app text inputs (e.g. R7 font selector)
after login. Now tryFill() bails out immediately if no input[type=password]
is visible — meaning we are no longer on a login form.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-21 09:02:22 +00:00
parent 51590cea80
commit d258f3e0fd
+3 -1
View File
@@ -95,7 +95,7 @@ _AUTOFILL_CONTENT_JS = r"""
for (const el of list) {
if (isVisible(el)) return el;
}
return list[0] || null;
return null;
}
function setNativeValue(el, v) {
@@ -115,6 +115,8 @@ _AUTOFILL_CONTENT_JS = r"""
function tryFill() {
const p = findPassField();
// No visible password field = not a login form; stop to avoid filling app inputs
if (!p) return;
const u = findUserField(p);
// Fill login FIRST so password-triggered re-render doesn't clear it
if (CREDS.login && u) {