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__
1515// UA sniffing for working around browser-specific quirks
1616const UA = inBrowser && window . navigator . userAgent . toLowerCase ( )
1717const 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
1929
2030/**
2131 * Defer a task to execute it asynchronously. Ideally this
@@ -40,7 +50,7 @@ export const nextTick = (function () {
4050 }
4151
4252 /* istanbul ignore else */
43- if ( typeof MutationObserver !== 'undefined' && ! ( isWechat && isIos ) ) {
53+ if ( typeof MutationObserver !== 'undefined' && ! hasMutationObserverBug ) {
4454 let counter = 1
4555 const observer = new MutationObserver ( nextTickHandler )
4656 const textNode = document . createTextNode ( String ( counter ) )
You can’t perform that action at this time.
0 commit comments