Repository navigation
v0.2.11: Fix browser automation when Chrome is minimized
What's Changed
Bug Fix: Chrome minimized support
Previously, browser-ctl commands would hang or fail when Chrome was minimized because several rendering-dependent APIs don't work on hidden pages:
requestAnimationFramecallbacks are paused → stability checks hung indefinitelydocument.elementFromPoint()returns null → hit-test always failedoffsetParent/getBoundingClientRect()may return incorrect values
Changes
- click.js: Skip rAF stability check and elementFromPoint hit-test when
document.hiddenis true - content-script.js: Same fix for all actionability checks (
ensureActionable) — affects click, dblclick, hover, drag, type, focus, check/uncheck, and snapshot - actions.js: Add CDP fallback for
doScreenshot()— usesPage.captureScreenshotwhencaptureVisibleTabfails (minimized window)
All commands now work correctly with Chrome minimized or in a background desktop.