From 02aff1d694687e195760497875c06657429d1929 Mon Sep 17 00:00:00 2001 From: PJ Date: Wed, 12 Aug 2026 20:42:52 +0530 Subject: [PATCH] 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 --- internal/driver/chrome/driver.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/driver/chrome/driver.go b/internal/driver/chrome/driver.go index bdf8b90..4914672 100644 --- a/internal/driver/chrome/driver.go +++ b/internal/driver/chrome/driver.go @@ -414,7 +414,12 @@ func (d *Driver) Hierarchy(ctx context.Context) (string, error) { focused: document.activeElement === el || null, checked: el.checked || 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