mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
fix(chrome): emit editable as a plain boolean
editable was emitted as `isEditable || null`, and an absent field sends internal/hierarchy into the native fallback, which reads any class name containing "EditText" as an Android text widget. On web that is just a CSS class, so a page styling a div with it was editable to the goja host and not to the web runtime, and the model policy could be offered typing into a div. Claude-Session: https://claude.ai/code/session_01A5KmftdEJ49A9z5mF5ESrX
This commit is contained in:
1 parent
b631601f5d
commit
02aff1d694
1 file changed
+6
-1
@@ -414,7 +414,12 @@ func (d *Driver) Hierarchy(ctx context.Context) (string, error) {
|
|||||||
focused: document.activeElement === el || null,
|
focused: document.activeElement === el || null,
|
||||||
checked: el.checked || null,
|
checked: el.checked || null,
|
||||||
selected: el.selected || null,
|
selected: el.selected || null,
|
||||||
editable: isEditable || null,
|
// Emitted as a plain boolean, never null: internal/hierarchy falls back to
|
||||||
|
// the native heuristic when the field is absent, which reads any class
|
||||||
|
// name containing "EditText" as an Android text widget. On web that is a
|
||||||
|
// CSS class, so a page styling a div with it made the goja host offer
|
||||||
|
// typing into a div the web runtime never calls editable.
|
||||||
|
editable: isEditable,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// Rooted at documentElement, not body, because collectTargets in
|
// Rooted at documentElement, not body, because collectTargets in
|
||||||
|
|||||||
Reference in new issue
Block a user