Skip to content

Commit 6fddefd

Browse files
authored
chore(bidi): pointerMove action needs to floor fractional values for x and y position (#34191)
1 parent 8accb0a commit 6fddefd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/playwright-core/src/server/bidi/bidiInput.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ export class RawMouseImpl implements input.RawMouse {
7979

8080
async move(x: number, y: number, button: types.MouseButton | 'none', buttons: Set<types.MouseButton>, modifiers: Set<types.KeyboardModifier>, forClick: boolean): Promise<void> {
8181
// Bidi throws when x/y are not integers.
82-
x = Math.round(x);
83-
y = Math.round(y);
82+
x = Math.floor(x);
83+
y = Math.floor(y);
8484
await this._performActions([{ type: 'pointerMove', x, y }]);
8585
}
8686

0 commit comments

Comments
 (0)