diff --git src/wp-includes/js/customize-base.js src/wp-includes/js/customize-base.js
index a1528de..7fb23a1 100644
|
|
|
window.wp = window.wp || {}; |
| 533 | 533 | this.element = api.ensure( element ); |
| 534 | 534 | this.events = ''; |
| 535 | 535 | |
| 536 | | if ( this.element.is('input, select, textarea') ) { |
| 537 | | this.events += 'change'; |
| | 536 | if ( this.element.is( 'input, select, textarea' ) ) { |
| | 537 | this.events += 'input'; |
| 538 | 538 | synchronizer = api.Element.synchronizer.val; |
| 539 | 539 | |
| 540 | | if ( this.element.is('input') ) { |
| 541 | | type = this.element.prop('type'); |
| 542 | | if ( api.Element.synchronizer[ type ] ) { |
| 543 | | synchronizer = api.Element.synchronizer[ type ]; |
| | 540 | if ( this.element.is( 'input' ) ) { |
| | 541 | type = this.element.prop( 'type' ); |
| | 542 | if ( api.Element.synchronizer[type] ) { |
| | 543 | synchronizer = api.Element.synchronizer[type]; |
| 544 | 544 | } |
| 545 | | if ( 'text' === type || 'password' === type ) { |
| 546 | | this.events += ' keyup'; |
| 547 | | } else if ( 'range' === type ) { |
| 548 | | this.events += ' input propertychange'; |
| 549 | | } |
| 550 | | } else if ( this.element.is('textarea') ) { |
| 551 | | this.events += ' keyup'; |
| 552 | 545 | } |
| 553 | 546 | } |
| 554 | 547 | |
| 555 | 548 | api.Value.prototype.initialize.call( this, null, $.extend( options || {}, synchronizer ) ); |
| 556 | 549 | this._value = this.get(); |
| 557 | 550 | |
| 558 | | update = this.update; |
| | 551 | update = this.update; |
| 559 | 552 | refresh = this.refresh; |
| 560 | 553 | |
| 561 | | this.update = function( to ) { |
| 562 | | if ( to !== refresh.call( self ) ) |
| | 554 | this.update = function ( to ) { |
| | 555 | if ( to !== refresh.call( self ) ) { |
| 563 | 556 | update.apply( this, arguments ); |
| | 557 | } |
| 564 | 558 | }; |
| 565 | | this.refresh = function() { |
| | 559 | this.refresh = function () { |
| 566 | 560 | self.set( refresh.call( self ) ); |
| 567 | 561 | }; |
| 568 | 562 | |