From a9c20ec280ce3a968abbca5611dcd63f412b5d34 Mon Sep 17 00:00:00 2001 From: Stephen Scott Date: Thu, 13 Dec 2018 19:46:59 +0000 Subject: [PATCH] Core: change focus() to trigger("focus") (#2243) Change focus() to trigger("focus") so that jQuery Migrate 3.x doesn't flag it as deprecated. --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 08352d4..ccb8d4c 100644 --- a/src/core.js +++ b/src/core.js @@ -602,7 +602,7 @@ $.extend( $.validator, { try { $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] ) .filter( ":visible" ) - .focus() + .trigger( "focus" ) // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find .trigger( "focusin" );