File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 262
262
_parseNodeAttributeAnnotation : function ( node , n , v ) {
263
263
var escape = this . _testEscape ( v ) ;
264
264
if ( escape ) {
265
+ var customEvent ;
265
266
// Cache name (`n` will be mangled)
266
267
var name = n ;
267
268
// Mode (one-way or two)
284
285
if ( mode == '{' && ( colon = v . indexOf ( '::' ) ) > 0 ) {
285
286
notifyEvent = v . substring ( colon + 2 ) ;
286
287
v = v . substring ( 0 , colon ) ;
288
+ customEvent = true ;
287
289
}
288
290
// Remove annotation
289
291
node . removeAttribute ( n ) ;
300
302
name : name ,
301
303
value : v ,
302
304
negate : not ,
303
- event : notifyEvent
305
+ event : notifyEvent ,
306
+ customEvent : customEvent
304
307
} ;
305
308
}
306
309
} ,
Original file line number Diff line number Diff line change 26
26
this . __data__ [ effect . value ] = value ;
27
27
}
28
28
var calc = effect . negate ? ! value : value ;
29
- return this . _applyEffectValue ( calc , effect ) ;
29
+ // For better interop, dirty check before setting when custom events
30
+ // are used, since the target element may not dirty check (e.g. <input>)
31
+ if ( ! effect . customEvent ||
32
+ this . _nodes [ effect . index ] [ effect . name ] !== calc ) {
33
+ return this . _applyEffectValue ( calc , effect ) ;
34
+ }
30
35
} ,
31
36
32
37
_reflectEffect : function ( source ) {
You can’t perform that action at this time.
0 commit comments