Skip to content

Commit 6c46ba2

Browse files
k4cper-gclaude
andcommitted
Make focus non-fatal in type action for CEF/Chromium compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f20732f commit 6c46ba2

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/actions/windows.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,10 +591,9 @@ export class WindowsActionHandler implements ActionHandler {
591591
}
592592

593593
// Fallback: keyboard simulation via Unicode SendInput.
594-
const focusResult = await this._uiaAction(hwnd, nodeIndex, "focus", {});
595-
if (!focusResult.success) {
596-
return { success: false, message: "", error: `Failed to focus element for typing: ${focusResult.error}` };
597-
}
594+
// Focus may fail on CEF/Chromium elements but the element might already be focused
595+
// from a prior click, so we continue regardless.
596+
await this._uiaAction(hwnd, nodeIndex, "focus", {});
598597

599598
// Select all existing text
600599
await this.press("ctrl+a");

0 commit comments

Comments
 (0)