Skip to content

Commit cc2e892

Browse files
abhiomkarcopybara-github
authored andcommitted
testing: Set MouseEvent.buttons when simulating mouse events.
PiperOrigin-RevId: 448014072
1 parent d77f695 commit cc2e892

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/testing/harness.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ export class Harness<E extends HTMLElement = HTMLElement> {
481481
clientY: (rect.top + rect.bottom) / 2,
482482
screenX: (rect.left + rect.right) / 2,
483483
screenY: (rect.top + rect.bottom) / 2,
484+
buttons: 1, // Primary button (usually the left button)
484485
};
485486
}
486487

0 commit comments

Comments
 (0)