|
2 | 2 |
|
3 | 3 | import { isDef, isUndef } from 'shared/util'
|
4 | 4 | import { updateListeners } from 'core/vdom/helpers/index'
|
5 |
| -import { isIE, isFF, supportsPassive, isUsingMicroTask } from 'core/util/index' |
| 5 | +import { isIE, isFF, isCEP, supportsPassive, isUsingMicroTask } from 'core/util/index' |
6 | 6 | import { RANGE_TOKEN, CHECKBOX_RADIO_TOKEN } from 'web/compiler/directives/model'
|
7 | 7 | import { currentFlushTimestamp } from 'core/observer/scheduler'
|
8 | 8 |
|
@@ -44,6 +44,14 @@ function createOnceHandler (event, handler, capture) {
|
44 | 44 | // safe to exclude.
|
45 | 45 | const useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53)
|
46 | 46 |
|
| 47 | +// #10366: CEP <= 9.3.x has a buggy Event.timeStamp implementation. While the |
| 48 | +// issue is restricted to macOS, the fix is OS-agnostic to keep behavioral |
| 49 | +// differences to a minimum. |
| 50 | +const isCEP93orEarlier = isCEP && ((maxBadMajor, maxBadMinor) => { |
| 51 | + const version = JSON.parse(window.__adobe_cep__.getCurrentApiVersion()) |
| 52 | + return version.major <= maxBadMajor && version.minor <= maxBadMinor |
| 53 | +})(9, 3) |
| 54 | + |
47 | 55 | function add (
|
48 | 56 | name: string,
|
49 | 57 | handler: Function,
|
@@ -71,6 +79,9 @@ function add (
|
71 | 79 | // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
|
72 | 80 | // #9681 QtWebEngine event.timeStamp is negative value
|
73 | 81 | e.timeStamp <= 0 ||
|
| 82 | + // #10366 Adobe CEP bug: event.timeStamp is not reliable on macOS for |
| 83 | + // host applications with CEP versions prior to 9.4.x. |
| 84 | + isCEP93orEarlier || |
74 | 85 | // #9448 bail if event is fired in another document in a multi-page
|
75 | 86 | // electron/nw.js app, since event.timeStamp will be using a different
|
76 | 87 | // starting reference
|
|
0 commit comments