diff options
Diffstat (limited to 'src/domains/click.ts')
| -rw-r--r-- | src/domains/click.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/domains/click.ts b/src/domains/click.ts index 0215d9a..cb4b007 100644 --- a/src/domains/click.ts +++ b/src/domains/click.ts @@ -36,9 +36,7 @@ const dispatchClick = async ( button: "left" | "right" | "middle", count: number, ): Promise<Result<void, ToolErr>> => { - // Move the pointer to the target first. Some focus/hover handlers (and React - // synthetic events) only fire when a mousemove precedes the press, so without - // it a click can land without focusing the element. + // Some focus/hover handlers and React synthetic events only fire when a mousemove precedes the press, so without it a click lands without focusing. const moved = await cdpCall(client, "Input.dispatchMouseEvent", { type: "mouseMoved", x, y }); if (!moved.success) return moved; const pressed = await cdpCall(client, "Input.dispatchMouseEvent", { |
