Browse Source

fix: bail out of event blocking for iOS bug

close #9462
dev
Evan You 6 years ago
parent
commit
0bad7e2a35
  1. 10
      src/platforms/web/runtime/modules/events.js

10
src/platforms/web/runtime/modules/events.js

@ -61,9 +61,17 @@ 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 ||
// #9462 bail for iOS 9 bug: event.timeStamp is 0 after history.pushState
e.timeStamp === 0 ||
// #9448 bail if event is fired in another document in a multi-page
// electron/nw.js app
// electron/nw.js app, since event.timeStamp will be using a different
// starting reference
e.target.ownerDocument !== document
) {
return original.apply(this, arguments)

Loading…
Cancel
Save