Make WordPress Core

Changeset 42458


Ignore:
Timestamp:
01/15/2018 11:50:57 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Widgets: When checking for errors in Custom HTML widget, pass correct value to toggleClass() for Save button.

toggleClass() expects a boolean as a second argument, not an integer.

Props iCaleb.
Merges 42457 to the 4.9 branch.
Fixes #42867.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/js/widgets/custom-html-widgets.js

    r41957 r42458  
    205205                 */
    206206                onUpdateErrorNotice: function onUpdateErrorNotice( errorAnnotations ) {
    207                     control.saveButton.toggleClass( 'validation-blocked disabled', errorAnnotations.length );
     207                    control.saveButton.toggleClass( 'validation-blocked disabled', errorAnnotations.length > 0 );
    208208                    control.updateErrorNotice( errorAnnotations );
    209209                }
Note: See TracChangeset for help on using the changeset viewer.