PointerEvent vs MouseEvent on event handlers #13039
-
Hi all,
I was wondering about the behavior and content of event handlers like @click, @drag, @touchend, etc ...
Having <div @click="doSomething"/>
, TS shows this onClick?: ((payload: MouseEvent) => void) | undefined
as the function type.
Meanwhile when I console.log the event, I get a MousePointer event properties.
Is vue's event payload different from vanilla JS? or is it a TS mistake? Why this is happening?
Beta Was this translation helpful? Give feedback.
All reactions
Vue just passes on the object from the native event, it doesn't change it.
The type may be incorrect, I suspect this may be related: #9675.
Replies: 1 comment
-
Vue just passes on the object from the native event, it doesn't change it.
The type may be incorrect, I suspect this may be related: #9675.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1 -
❤️ 1