WordPress.org

Make WordPress Core

Changeset 40785


Ignore:
Timestamp:
05/18/17 21:03:12 (2 months ago)
Author:
westonruter
Message:

Widgets: Ensure title field for media widget will update with sanitized value after change event in addition to input event.

Aligns behavior of field with Text widget and other widgets whereby the server-sanitized title (via the widget-update request) is supplied into the field after the change event.

See #32417.
Fixes #40805.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/widgets/media-widgets.js

    r40772 r40785  
    484484 
    485485            // Update the title. 
    486             control.$el.on( 'input', '.title', function updateTitle() { 
     486            control.$el.on( 'input change', '.title', function updateTitle() { 
    487487                control.model.set({ 
    488488                    title: $.trim( $( this ).val() ) 
Note: See TracChangeset for help on using the changeset viewer.