WordPress.org

Make WordPress Core

Changeset 21024


Ignore:
Timestamp:
06/07/2012 10:00:59 PM (9 years ago)
Author:
ryan
Message:

Customizer: Add keyup events to sync textarea values. Props koopersmith. fixes #20879

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/customize-controls.dev.js

    r21022 r21024  
    574574        // Prevent the form from saving when enter is pressed.
    575575        $('#customize-controls').on( 'keydown', function( e ) {
     576            if ( $( e.target ).is('textarea') )
     577                return;
     578
    576579            if ( 13 === e.which ) // Enter
    577580                e.preventDefault();
  • trunk/wp-includes/js/customize-base.dev.js

    r20988 r21024  
    407407                    if ( 'text' === type || 'password' === type )
    408408                        this.events += ' keyup';
     409                } else if ( this.element.is('textarea') ) {
     410                    this.events += ' keyup';
    409411                }
    410412            }
Note: See TracChangeset for help on using the changeset viewer.