mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(bidi): pointerMove action needs to floor fractional values for x and y position (#34191)
This commit is contained in:
parent
8accb0ad1b
commit
6fddefde81
@ -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 }]);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user