Skip to content

Commit

Permalink
fix: skip microtask fix if event is fired from different document
Browse files Browse the repository at this point in the history
fix #9448
  • Loading branch information
yyx990803 committed Feb 6, 2019
1 parent d5ade28 commit dae7e41
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/platforms/web/runtime/modules/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ function add (
const attachedTimestamp = currentFlushTimestamp
const original = handler
handler = original._wrapper = function (e) {
if (e.timeStamp >= attachedTimestamp) {
if (
e.timeStamp >= attachedTimestamp ||
// #9448 bail if event is fired in another document in a multi-page
// electron/nw.js app
e.target.ownerDocument !== document
) {
return original.apply(this, arguments)
}
}
Expand Down

0 comments on commit dae7e41

Please sign in to comment.