@@ -897,15 +897,8 @@ var WidgetCustomizer = ( function ($) {
897897 // Handle widgets that support live previews
898898 if ( control . params . is_live_previewable ) {
899899 widget_content . on ( 'change input propertychange' , ':input' , function ( e ) {
900- var input = $ ( this ) ;
901- var is_valid = ( this . checkValidity && this . checkValidity ( ) ) ;
902- if ( e . type === 'change' || is_valid ) {
903- if ( is_valid ) {
904- input . removeClass ( 'client-invalid' ) ;
905- }
900+ if ( e . type === 'change' || ( this . checkValidity && this . checkValidity ( ) ) ) {
906901 trigger_save ( ) ;
907- } else if ( this . checkValidity && ! this . checkValidity ( ) ) {
908- input . addClass ( 'client-invalid' ) ;
909902 }
910903 } ) ;
911904 }
@@ -1124,17 +1117,10 @@ var WidgetCustomizer = ( function ($) {
11241117 // it will be updated upon the change event
11251118 if ( args . ignore_active_element || ! input . is ( document . activeElement ) ) {
11261119 input . prop ( property , sanitized_state ) ;
1127- input . removeClass ( 'server-invalid' ) ;
1128- input . removeClass ( 'client-invalid' ) ;
1129- // @todo Yellowfade?
1130- } else {
1131- input . addClass ( 'server-invalid' ) ;
11321120 }
11331121 control . hook ( 'unsanitaryField' , input , sanitized_state , state ) ;
11341122
11351123 } else {
1136- input . removeClass ( 'server-invalid' ) ;
1137- input . removeClass ( 'client-invalid' ) ;
11381124 control . hook ( 'sanitaryField' , input , state ) ;
11391125 }
11401126 } ) ;
0 commit comments