Skip to content

Commit 0cb3c95

Browse files
committed
Core: Explicit default for focusCleanup option
Also removes unused blockFocusCleanup property check. Fixes jquery-validation#676
1 parent c054707 commit 0cb3c95

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ $.extend( $.validator, {
229229
errorClass: "error",
230230
validClass: "valid",
231231
errorElement: "label",
232+
focusCleanup: false,
232233
focusInvalid: true,
233234
errorContainer: $( [] ),
234235
errorLabelContainer: $( [] ),
@@ -238,8 +239,8 @@ $.extend( $.validator, {
238239
onfocusin: function( element ) {
239240
this.lastActive = element;
240241

241-
// hide error label and remove error class on focus if enabled
242-
if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
242+
// Hide error label and remove error class on focus if enabled
243+
if ( this.settings.focusCleanup ) {
243244
if ( this.settings.unhighlight ) {
244245
this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
245246
}

0 commit comments

Comments
 (0)