Skip to content

Commit d97342e

Browse files
fix(server): preview drag moves the mouse during the drag
ServerBrowserPage.drag called dragTo with one mouse move, which Chromium delivers before dragstart, so pages tracking a drag with mousemove saw none. Move in 5 steps. Fixes #36092 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent b6e5f55 commit d97342e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/server/src/preview/ServerBrowserPage.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,8 @@ export const drag = async (
888888
const target = targetLocator(page, { locator: input.target })!;
889889
await pointer(await targetPoint(page, source, {}, timeout), "move");
890890
// Observe drag rejection immediately; an unhandled rejection during cursor movement exits the server.
891-
const dragFailure = source.dragTo(target, { timeout }).then(
891+
// Chromium delivers a single move before dragstart; steps give the page mousemoves during the drag.
892+
const dragFailure = source.dragTo(target, { timeout, steps: 5 }).then(
892893
() => null,
893894
(error: unknown) => ({ error }),
894895
);

0 commit comments

Comments
 (0)