Skip to content

Commit 16d7d6b

Browse files
committed
fix(#10515): Do not use micro tasks in Pale Moon browser
Bugfix for #10515
1 parent e90cc60 commit 16d7d6b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: src/core/util/env.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform ==
1616
export const isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge
1717
export const isPhantomJS = UA && /phantomjs/.test(UA)
1818
export const isFF = UA && UA.match(/firefox\/(\d+)/)
19+
export const isPaleMoon = UA && UA.match(/palemoon\/(\d+)/)
1920

2021
// Firefox has a "watch" function on Object.prototype...
2122
export const nativeWatch = ({}).watch

Diff for: src/platforms/web/runtime/modules/events.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { isDef, isUndef } from 'shared/util'
44
import { updateListeners } from 'core/vdom/helpers/index'
5-
import { isIE, isFF, supportsPassive, isUsingMicroTask } from 'core/util/index'
5+
import { isIE, isFF, isPaleMoon, supportsPassive, isUsingMicroTask } from 'core/util/index'
66
import { RANGE_TOKEN, CHECKBOX_RADIO_TOKEN } from 'web/compiler/directives/model'
77
import { currentFlushTimestamp } from 'core/observer/scheduler'
88

@@ -42,7 +42,7 @@ function createOnceHandler (event, handler, capture) {
4242
// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp
4343
// implementation and does not fire microtasks in between event propagation, so
4444
// safe to exclude.
45-
const useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53)
45+
const useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53) && !isPaleMoon
4646

4747
function add (
4848
name: string,

0 commit comments

Comments
 (0)