You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Stencil Version
latest
Current Behavior
Stencils onClick event is typed as (event: MouseEvent) => ...
According to MDN and chrome debugging in modern browsers the on click event / "click" returns a PointerEvent that extends the MouseEvent.
If you inspect the callback of a stencil onClick event you will see that it returns the PointerEvent.
Only support MouseEvent is not wrong it's just if you want to type it correctly TS will complain
Prerequisites
Stencil Version
latest
Current Behavior
Stencils onClick event is typed as
(event: MouseEvent) => ...
According to MDN and chrome debugging in modern browsers the on click event / "click" returns a PointerEvent that extends the MouseEvent.
If you inspect the callback of a stencil onClick event you will see that it returns the PointerEvent.
Only support MouseEvent is not wrong it's just if you want to type it correctly TS will complain
see:

Expected Behavior
onClick should be typed to support both PointerEvent and MouseEvent, see:
https://developer.mozilla.org/de/docs/Web/API/Element/click_event
System Info
Steps to Reproduce
or JSX
<button onClick="this.eventHandler">
debug in browser dev tools the type is PointerEvent, in Stencil JSX Base only MouseEvent is supported but not PointerEvents.
Code Reproduction URL
http://......
Additional Information
No response
The text was updated successfully, but these errors were encountered: