mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	Revert "chore(bidi): use fractional coordinates for pointerAction (#3… (#34753)
This commit is contained in:
		
							parent
							
								
									8eb816b363
								
							
						
					
					
						commit
						703ca9f851
					
				@ -79,6 +79,9 @@ 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.
 | 
				
			||||||
 | 
					    x = Math.floor(x);
 | 
				
			||||||
 | 
					    y = Math.floor(y);
 | 
				
			||||||
    await this._performActions([{ type: 'pointerMove', x, y }]);
 | 
					    await this._performActions([{ type: 'pointerMove', x, y }]);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -91,6 +94,9 @@ export class RawMouseImpl implements input.RawMouse {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  async wheel(x: number, y: number, buttons: Set<types.MouseButton>, modifiers: Set<types.KeyboardModifier>, deltaX: number, deltaY: number): Promise<void> {
 | 
					  async wheel(x: number, y: number, buttons: Set<types.MouseButton>, modifiers: Set<types.KeyboardModifier>, deltaX: number, deltaY: number): Promise<void> {
 | 
				
			||||||
 | 
					    // Bidi throws when x/y are not integers.
 | 
				
			||||||
 | 
					    x = Math.floor(x);
 | 
				
			||||||
 | 
					    y = Math.floor(y);
 | 
				
			||||||
    await this._session.send('input.performActions', {
 | 
					    await this._session.send('input.performActions', {
 | 
				
			||||||
      context: this._session.sessionId,
 | 
					      context: this._session.sessionId,
 | 
				
			||||||
      actions: [
 | 
					      actions: [
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user