From dae7e4182fbbb41e599953cc22e5d54dbb164070 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 6 Feb 2019 15:57:06 -0500 Subject: [PATCH] fix: skip microtask fix if event is fired from different document fix #9448 --- src/platforms/web/runtime/modules/events.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/platforms/web/runtime/modules/events.js b/src/platforms/web/runtime/modules/events.js index 2721a1fd5d5..d030f55d3bc 100644 --- a/src/platforms/web/runtime/modules/events.js +++ b/src/platforms/web/runtime/modules/events.js @@ -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) } }