11/*!
2- * Vue.js v2.5.8
2+ * Vue.js v2.5.9
33 * (c) 2014-2017 Evan You
44 * Released under the MIT License.
55 */
@@ -717,9 +717,9 @@ var VNode = function VNode (
717717 this . elm = elm ;
718718 this . ns = undefined ;
719719 this . context = context ;
720- this . functionalContext = undefined ;
721- this . functionalOptions = undefined ;
722- this . functionalScopeId = undefined ;
720+ this . fnContext = undefined ;
721+ this . fnOptions = undefined ;
722+ this . fnScopeId = undefined ;
723723 this . key = data && data . key ;
724724 this . componentOptions = componentOptions ;
725725 this . componentInstance = undefined ;
@@ -778,6 +778,9 @@ function cloneVNode (vnode, deep) {
778778 cloned . isStatic = vnode . isStatic ;
779779 cloned . key = vnode . key ;
780780 cloned . isComment = vnode . isComment ;
781+ cloned . fnContext = vnode . fnContext ;
782+ cloned . fnOptions = vnode . fnOptions ;
783+ cloned . fnScopeId = vnode . fnScopeId ;
781784 cloned . isCloned = true ;
782785 if ( deep ) {
783786 if ( vnode . children ) {
@@ -2524,7 +2527,7 @@ function resolveSlots (
25242527 }
25252528 // named slots should only be respected if the vnode was rendered in the
25262529 // same context.
2527- if ( ( child . context === context || child . functionalContext === context ) &&
2530+ if ( ( child . context === context || child . fnContext === context ) &&
25282531 data && data . slot != null
25292532 ) {
25302533 var name = child . data . slot ;
@@ -2744,7 +2747,10 @@ function mountComponent (
27442747 } ;
27452748 }
27462749
2747- vm . _watcher = new Watcher ( vm , updateComponent , noop ) ;
2750+ // we set this to vm._watcher inside the watcher's constructor
2751+ // since the watcher's initial patch may call $forceUpdate (e.g. inside child
2752+ // component's mounted hook), which relies on vm._watcher being already defined
2753+ new Watcher ( vm , updateComponent , noop , null , true /* isRenderWatcher */ ) ;
27482754 hydrating = false ;
27492755
27502756 // manually mounted instance, call mounted on self
@@ -3031,9 +3037,13 @@ var Watcher = function Watcher (
30313037 vm ,
30323038 expOrFn ,
30333039 cb ,
3034- options
3040+ options ,
3041+ isRenderWatcher
30353042) {
30363043 this . vm = vm ;
3044+ if ( isRenderWatcher ) {
3045+ vm . _watcher = this ;
3046+ }
30373047 vm . _watchers . push ( this ) ;
30383048 // options
30393049 if ( options ) {
@@ -3944,8 +3954,8 @@ function FunctionalRenderContext (
39443954 this . _c = function ( a , b , c , d ) {
39453955 var vnode = createElement ( contextVm , a , b , c , d , needNormalization ) ;
39463956 if ( vnode ) {
3947- vnode . functionalScopeId = options . _scopeId ;
3948- vnode . functionalContext = parent ;
3957+ vnode . fnScopeId = options . _scopeId ;
3958+ vnode . fnContext = parent ;
39493959 }
39503960 return vnode
39513961 } ;
@@ -3986,8 +3996,8 @@ function createFunctionalComponent (
39863996 var vnode = options . render . call ( null , renderContext . _c , renderContext ) ;
39873997
39883998 if ( vnode instanceof VNode ) {
3989- vnode . functionalContext = contextVm ;
3990- vnode . functionalOptions = options ;
3999+ vnode . fnContext = contextVm ;
4000+ vnode . fnOptions = options ;
39914001 if ( data . slot ) {
39924002 ( vnode . data || ( vnode . data = { } ) ) . slot = data . slot ;
39934003 }
@@ -4822,7 +4832,7 @@ function pruneCacheEntry (
48224832 current
48234833) {
48244834 var cached$$1 = cache [ key ] ;
4825- if ( cached$$1 && cached$$1 !== current ) {
4835+ if ( cached$$1 && ( ! current || cached$$1 . tag !== current . tag ) ) {
48264836 cached$$1 . componentInstance . $destroy ( ) ;
48274837 }
48284838 cache [ key ] = null ;
@@ -4973,7 +4983,7 @@ Object.defineProperty(Vue$3.prototype, '$ssrContext', {
49734983 }
49744984} ) ;
49754985
4976- Vue$3 . version = '2.5.8 ' ;
4986+ Vue$3 . version = '2.5.9 ' ;
49774987
49784988/* */
49794989
@@ -5572,7 +5582,7 @@ function createPatchFunction (backend) {
55725582 // of going through the normal attribute patching process.
55735583 function setScope ( vnode ) {
55745584 var i ;
5575- if ( isDef ( i = vnode . functionalScopeId ) ) {
5585+ if ( isDef ( i = vnode . fnScopeId ) ) {
55765586 nodeOps . setAttribute ( vnode . elm , i , '' ) ;
55775587 } else {
55785588 var ancestor = vnode ;
@@ -5586,7 +5596,7 @@ function createPatchFunction (backend) {
55865596 // for slot content they should also get the scopeId from the host instance.
55875597 if ( isDef ( i = activeInstance ) &&
55885598 i !== vnode . context &&
5589- i !== vnode . functionalContext &&
5599+ i !== vnode . fnContext &&
55905600 isDef ( i = i . $options . _scopeId )
55915601 ) {
55925602 nodeOps . setAttribute ( vnode . elm , i , '' ) ;
@@ -6176,7 +6186,7 @@ function updateAttrs (oldVnode, vnode) {
61766186 // #4391: in IE9, setting type can reset value for input[type=radio]
61776187 // #6666: IE/Edge forces progress value down to 1 before setting a max
61786188 /* istanbul ignore if */
6179- if ( ( isIE9 || isEdge ) && attrs . value !== oldAttrs . value ) {
6189+ if ( ( isIE || isEdge ) && attrs . value !== oldAttrs . value ) {
61806190 setAttr ( elm , 'value' , attrs . value ) ;
61816191 }
61826192 for ( key in oldAttrs ) {
@@ -6216,6 +6226,23 @@ function setAttr (el, key, value) {
62166226 if ( isFalsyAttrValue ( value ) ) {
62176227 el . removeAttribute ( key ) ;
62186228 } else {
6229+ // #7138: IE10 & 11 fires input event when setting placeholder on
6230+ // <textarea>... block the first input event and remove the blocker
6231+ // immediately.
6232+ /* istanbul ignore if */
6233+ if (
6234+ isIE && ! isIE9 &&
6235+ el . tagName === 'TEXTAREA' &&
6236+ key === 'placeholder' && ! el . __ieph
6237+ ) {
6238+ var blocker = function ( e ) {
6239+ e . stopImmediatePropagation ( ) ;
6240+ el . removeEventListener ( 'input' , blocker ) ;
6241+ } ;
6242+ el . addEventListener ( 'input' , blocker ) ;
6243+ // $flow-disable-line
6244+ el . __ieph = true ; /* IE placeholder patched */
6245+ }
62196246 el . setAttribute ( key , value ) ;
62206247 }
62216248 }
@@ -8830,7 +8857,8 @@ function parseHTML (html, options) {
88308857var onRE = / ^ @ | ^ v - o n : / ;
88318858var dirRE = / ^ v - | ^ @ | ^ : / ;
88328859var forAliasRE = / ( .* ?) \s + (?: i n | o f ) \s + ( .* ) / ;
8833- var forIteratorRE = / \( ( \{ [ ^ } ] * \} | [ ^ , ] * ) , ( [ ^ , ] * ) (?: , ( [ ^ , ] * ) ) ? \) / ;
8860+ var forIteratorRE = / \( ( \{ [ ^ } ] * \} | [ ^ , { ] * ) , ( [ ^ , ] * ) (?: , ( [ ^ , ] * ) ) ? \) / ;
8861+ var stripParensRE = / ^ \( | \) $ / g;
88348862
88358863var argRE = / : ( .* ) $ / ;
88368864var bindRE = / ^ : | ^ v - b i n d : / ;
@@ -9171,7 +9199,7 @@ function processFor (el) {
91719199 el . iterator2 = iteratorMatch [ 3 ] . trim ( ) ;
91729200 }
91739201 } else {
9174- el . alias = alias ;
9202+ el . alias = alias . replace ( stripParensRE , '' ) ;
91759203 }
91769204 }
91779205}
0 commit comments