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> {
|
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.
|
// Bidi throws when x/y are not integers.
|
||||||
x = Math.round(x);
|
x = Math.floor(x);
|
||||||
y = Math.round(y);
|
y = Math.floor(y);
|
||||||
await this._performActions([{ type: 'pointerMove', x, y }]);
|
await this._performActions([{ type: 'pointerMove', x, y }]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue