fix click-outsie: change the capture phase

This commit is contained in:
vijay 2020-12-31 14:22:16 +08:00
parent a2a1b94628
commit 4f21ea4cb5

View File

@ -18,12 +18,12 @@ const nodeList: FlushList = new Map()
let startClick: MouseEvent
if (!isServer) {
on(document, 'mousedown', (e: MouseEvent) => (startClick = e))
on(document, 'mousedown', (e: MouseEvent) => (startClick = e), true)
on(document, 'mouseup', (e: MouseEvent) => {
for (const { documentHandler } of nodeList.values()) {
documentHandler(e, startClick)
}
})
}, true)
}
function createDocumentHandler(