fix(dashboard): interactive clicks with remote browsers and screencast freeze#40630
fix(dashboard): interactive clicks with remote browsers and screencast freeze#40630Ishita-Jinturkar wants to merge 1 commit intomicrosoft:mainfrom
Conversation
994c0d6 to
932373c
Compare
Test results for "MCP"3 failed 6901 passed, 1052 skipped Merge workflow run. |
Test results for "tests 1"4 flaky41619 passed, 850 skipped Merge workflow run. |
| return; | ||
| const vp = page.viewportSize(); | ||
| this._owner.emitFrame(data.toString('base64'), vp?.width ?? 0, vp?.height ?? 0); | ||
| this._owner.emitFrame(data.toString('base64'), vp.width, vp.height); |
There was a problem hiding this comment.
I'll accept this but only this change, the rest seem to be noop.
|
@Ishita-Jinturkar please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Dashboard interactive clicks now work with connectOverCDP(), Android, and iOS remote debugging by falling back to window.innerWidth/innerHeight when viewport is null. Fixes: microsoft#40625
932373c to
cd8fcf4
Compare
Bug 1: Interactive clicks don't work with remote browsers
Summary: Dashboard interactive clicks go to (0,0) instead of intended coordinates when using
connectOverCDP(), Android, or iOS remote debugging.Root Cause: Remote browsers intentionally set
viewport: nullto avoid interfering with the browser's natural viewport. When Dashboard callspage.viewportSize(), it returnsnull, causing the coordinate mapping functionclientToViewport()to receive0×0dimensions and always map clicks to the top-left corner.Reproduction Steps:
2.Run Playwright Dashboard and connect over CDP:
Open Dashboard in interactive mode
Try to click any element on the page
Expected: Click happens at the clicked location
Actual: Click always happens at (0,0) - top-left corner
User impact:
Interactive mode features fail: generate locator, hover, highlight, mouse events, keyboard events, fill, type, check, uncheck, select
Only scrolling works (doesn't require coordinate transformation)
Workaround: Manually resizing the viewport makes it work temporarily
Change: Modified the _startScreencast() method to detect viewport size once before streaming starts.