|
|
@@ -7,7 +7,7 @@ import { ErrorCodes } from 'packages/runtime-core/src/errorHandling'
|
|
|
|
|
|
interface Invoker extends EventListener {
|
|
|
value: EventValue
|
|
|
- lastUpdated: number
|
|
|
+ attached: number
|
|
|
}
|
|
|
|
|
|
type EventValue = (Function | Function[]) & {
|
|
|
@@ -103,7 +103,6 @@ export function patchEvent(
|
|
|
;(prevValue as EventValue).invoker = null
|
|
|
invoker.value = value
|
|
|
nextValue.invoker = invoker
|
|
|
- invoker.lastUpdated = getNow()
|
|
|
} else {
|
|
|
addEventListener(
|
|
|
el,
|
|
|
@@ -129,7 +128,7 @@ function createInvoker(
|
|
|
// and the handler would only fire if the event passed to it was fired
|
|
|
// AFTER it was attached.
|
|
|
const timeStamp = e.timeStamp || _getNow()
|
|
|
- if (timeStamp >= invoker.lastUpdated - 1) {
|
|
|
+ if (timeStamp >= invoker.attached - 1) {
|
|
|
callWithAsyncErrorHandling(
|
|
|
patchStopImmediatePropagation(e, invoker.value),
|
|
|
instance,
|
|
|
@@ -140,7 +139,7 @@ function createInvoker(
|
|
|
}
|
|
|
invoker.value = initialValue
|
|
|
initialValue.invoker = invoker
|
|
|
- invoker.lastUpdated = getNow()
|
|
|
+ invoker.attached = getNow()
|
|
|
return invoker
|
|
|
}
|
|
|
|