File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,17 @@ export const devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__
15
15
// UA sniffing for working around browser-specific quirks
16
16
const UA = inBrowser && window . navigator . userAgent . toLowerCase ( )
17
17
const isIos = UA && / ( i p h o n e | i p a d | i p o d | i o s ) / i. test ( UA )
18
- const isWechat = UA && UA . indexOf ( 'micromessenger' ) > 0
18
+ const iosVersionMatch = isIos && UA . match ( / o s ( [ \d _ ] + ) / )
19
+ const iosVersion = iosVersionMatch && iosVersionMatch [ 1 ] . split ( '_' )
20
+
21
+ // MutationObserver is unreliable in iOS 9.3 UIWebView
22
+ // detecting it by checking presence of IndexedDB
23
+ // ref #3027
24
+ const hasMutationObserverBug =
25
+ iosVersion &&
26
+ Number ( iosVersion [ 0 ] ) >= 9 &&
27
+ Number ( iosVersion [ 1 ] ) >= 3 &&
28
+ ! window . indexedDB
19
29
20
30
/**
21
31
* Defer a task to execute it asynchronously. Ideally this
@@ -40,7 +50,7 @@ export const nextTick = (function () {
40
50
}
41
51
42
52
/* istanbul ignore else */
43
- if ( typeof MutationObserver !== 'undefined' && ! ( isWechat && isIos ) ) {
53
+ if ( typeof MutationObserver !== 'undefined' && ! hasMutationObserverBug ) {
44
54
let counter = 1
45
55
const observer = new MutationObserver ( nextTickHandler )
46
56
const textNode = document . createTextNode ( String ( counter ) )
You can’t perform that action at this time.
0 commit comments