Make WordPress Core

Changeset 41813


Ignore:
Timestamp:
10/10/2017 06:06:24 PM (7 years ago)
Author:
westonruter
Message:

Widgets: Allow deletion even when widget form fails validity checks.

Props felipeelia.
Amends [41352].
See #23120.
Fixes #42127.

File:
1 edited

Legend:

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

    r41621 r41813  
    516516            form = widget.find( 'form' );
    517517
    518         if ( form.prop( 'checkValidity' ) && ! form[0].checkValidity() ) {
     518        if ( ! del && form.prop( 'checkValidity' ) && ! form[0].checkValidity() ) {
    519519            return;
    520520        }
Note: See TracChangeset for help on using the changeset viewer.