Skip to content

Commit

Permalink
chore(bidi): pointerMove action needs to floor fractional values for …
Browse files Browse the repository at this point in the history
…x and y position (#34191)
  • Loading branch information
whimboo authored Feb 7, 2025
1 parent 8accb0a commit 6fddefd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/playwright-core/src/server/bidi/bidiInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export class RawMouseImpl implements input.RawMouse {

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

Expand Down

0 comments on commit 6fddefd

Please sign in to comment.