Core: Explicit default for focusCleanup option

Also removes unused blockFocusCleanup property check.

Fixes #676
This commit is contained in:
Jörn Zaefferer
2014-09-23 11:53:17 +02:00
parent c054707d6f
commit 0cb3c957c1

View File

@@ -229,6 +229,7 @@ $.extend( $.validator, {
errorClass: "error",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
focusInvalid: true,
errorContainer: $( [] ),
errorLabelContainer: $( [] ),
@@ -238,8 +239,8 @@ $.extend( $.validator, {
onfocusin: function( element ) {
this.lastActive = element;
// hide error label and remove error class on focus if enabled
if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
// Hide error label and remove error class on focus if enabled
if ( this.settings.focusCleanup ) {
if ( this.settings.unhighlight ) {
this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
}