Changeset 41387
- Timestamp:
- 09/18/2017 07:10:38 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/customize-base.js
r41374 r41387 552 552 this.events = ''; 553 553 554 if ( this.element.is('input, select, textarea') ) { 555 this.events += 'change'; 554 if ( this.element.is( 'input, select, textarea' ) ) { 555 type = this.element.prop( 'type' ); 556 this.events += ' change input'; 556 557 synchronizer = api.Element.synchronizer.val; 557 558 558 if ( this.element.is('input') ) { 559 type = this.element.prop('type'); 560 if ( api.Element.synchronizer[ type ] ) { 561 synchronizer = api.Element.synchronizer[ type ]; 562 } 563 if ( 'text' === type || 'password' === type ) { 564 this.events += ' keyup'; 565 } else if ( 'range' === type ) { 566 this.events += ' input propertychange'; 567 } 568 } else if ( this.element.is('textarea') ) { 569 this.events += ' keyup'; 559 if ( this.element.is( 'input' ) && api.Element.synchronizer[ type ] ) { 560 synchronizer = api.Element.synchronizer[ type ]; 570 561 } 571 562 } … … 574 565 this._value = this.get(); 575 566 576 update 567 update = this.update; 577 568 refresh = this.refresh; 578 569 579 570 this.update = function( to ) { 580 if ( to !== refresh.call( self ) ) 571 if ( to !== refresh.call( self ) ) { 581 572 update.apply( this, arguments ); 573 } 582 574 }; 583 575 this.refresh = function() {
Note: See TracChangeset
for help on using the changeset viewer.