Permalink
Browse files

Core: Explicit default for focusCleanup option

Also removes unused blockFocusCleanup property check.

Fixes #676
  • Loading branch information...
jzaefferer committed Sep 23, 2014
1 parent c054707 commit 0cb3c957c19361b5efec1a72d6540a1b95a3d78a
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core.js
View
@@ -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 );
}

0 comments on commit 0cb3c95

Please sign in to comment.