From 74888192a112fc858155f2eeba5446021fc44ee3 Mon Sep 17 00:00:00 2001 From: abccodes Date: Fri, 12 Jun 2026 22:45:54 -0700 Subject: [PATCH] [aidan] bug: combobox text fill --- frontend/src/shared/browserCommandHandler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/shared/browserCommandHandler.ts b/frontend/src/shared/browserCommandHandler.ts index 0858eaf6..77664d7d 100644 --- a/frontend/src/shared/browserCommandHandler.ts +++ b/frontend/src/shared/browserCommandHandler.ts @@ -654,7 +654,9 @@ async function clickBackendNode( // the wrong element (the box model is frame-local but the click dispatches in the root // frame), while DOM.focus reaches the node in any frame. With a `text` arg we then // insert the whole string at once, no clicking, no character-by-character typing. - if (/\b(textbox|searchbox)\b/i.test(opts.role || '')) { + const _role = opts.role || ''; + const _wantsText = typeof opts.text === 'string' && opts.text.length > 0; + if (/\b(textbox|searchbox)\b/i.test(_role) || (/\bcombobox\b/i.test(_role) && _wantsText)) { try { await sendCdp(wv, 'DOM.focus', { backendNodeId }, sessionId); } catch (err: any) {