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:
@@ -95,7 +95,7 @@ _AUTOFILL_CONTENT_JS = r"""
|
|||||||
for (const el of list) {
|
for (const el of list) {
|
||||||
if (isVisible(el)) return el;
|
if (isVisible(el)) return el;
|
||||||
}
|
}
|
||||||
return list[0] || null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setNativeValue(el, v) {
|
function setNativeValue(el, v) {
|
||||||
@@ -115,6 +115,8 @@ _AUTOFILL_CONTENT_JS = r"""
|
|||||||
|
|
||||||
function tryFill() {
|
function tryFill() {
|
||||||
const p = findPassField();
|
const p = findPassField();
|
||||||
|
// No visible password field = not a login form; stop to avoid filling app inputs
|
||||||
|
if (!p) return;
|
||||||
const u = findUserField(p);
|
const u = findUserField(p);
|
||||||
// Fill login FIRST so password-triggered re-render doesn't clear it
|
// Fill login FIRST so password-triggered re-render doesn't clear it
|
||||||
if (CREDS.login && u) {
|
if (CREDS.login && u) {
|
||||||
|
|||||||
Reference in New Issue
Block a user