How to set pointer width/height #1118
|
Hey, I'm trying to match the events we get in the browser, and with user.click, I get a pointer event with width and height both 0. However, when I click in Chrome/Safari/Firefox, I get width and height of 1. I can't quite figure out the right options or parameters to set in order to accomplish this. I think it should be possible given that the pointer init event takes a width and height as arguments. https://github.com/testing-library/user-event/blob/main/src/event/createEvent.ts#L211 |
Replies: 2 comments
|
I would expect this to be in user.setup's pointerMap, but it doesn't appear to propagate through and the type for each pointer is https://github.com/testing-library/user-event/blob/main/src/system/pointer/shared.ts#L4 |
|
Just updating issue. User Event now emits height/width of 1 correctly. However, it still doesn't allow you to override that, for instance, many virtual pointer events use height/width of 0 and other inputs may allow for other values |
Just updating issue. User Event now emits height/width of 1 correctly. However, it still doesn't allow you to override that, for instance, many virtual pointer events use height/width of 0 and other inputs may allow for other values