diff --git a/src/platforms/web/runtime/modules/events.js b/src/platforms/web/runtime/modules/events.js index ecb08af32de..0d735d10ce9 100644 --- a/src/platforms/web/runtime/modules/events.js +++ b/src/platforms/web/runtime/modules/events.js @@ -61,16 +61,18 @@ function add ( const original = handler handler = original._wrapper = function (e) { if ( - // no bubbling, should always fire. - // this is just a safety net in case event.timeStamp is unreliable in - // certain weird environments... - e.target === e.currentTarget || // event is fired after handler attachment e.timeStamp >= attachedTimestamp || // bail for environments that have buggy event.timeStamp implementations // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState // #9681 QtWebEngine event.timeStamp is negative value e.timeStamp <= 0 || + // no bubbling, should always fire. + // this is just a safety net in case event.timeStamp is unreliable in + // certain weird environments... + e.target === e.currentTarget || + // like previous, but event source is child element + e.currentTarget.contains(e.target) || // #9448 bail if event is fired in another document in a multi-page // electron/nw.js app, since event.timeStamp will be using a different // starting reference