diff --git a/src/core/util/env.js b/src/core/util/env.js index eff1d21dc75..7c508f29802 100644 --- a/src/core/util/env.js +++ b/src/core/util/env.js @@ -16,6 +16,7 @@ export const isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform == export const isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge export const isPhantomJS = UA && /phantomjs/.test(UA) export const isFF = UA && UA.match(/firefox\/(\d+)/) +export const isPaleMoon = UA && UA.match(/palemoon\/(\d+)/) // Firefox has a "watch" function on Object.prototype... export const nativeWatch = ({}).watch diff --git a/src/platforms/web/runtime/modules/events.js b/src/platforms/web/runtime/modules/events.js index ecb08af32de..527387bd932 100644 --- a/src/platforms/web/runtime/modules/events.js +++ b/src/platforms/web/runtime/modules/events.js @@ -2,7 +2,7 @@ import { isDef, isUndef } from 'shared/util' import { updateListeners } from 'core/vdom/helpers/index' -import { isIE, isFF, supportsPassive, isUsingMicroTask } from 'core/util/index' +import { isIE, isFF, isPaleMoon, supportsPassive, isUsingMicroTask } from 'core/util/index' import { RANGE_TOKEN, CHECKBOX_RADIO_TOKEN } from 'web/compiler/directives/model' import { currentFlushTimestamp } from 'core/observer/scheduler' @@ -42,7 +42,7 @@ function createOnceHandler (event, handler, capture) { // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp // implementation and does not fire microtasks in between event propagation, so // safe to exclude. -const useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53) +const useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53) && !isPaleMoon function add ( name: string,