From 4b41c0c03a90ab21293a6fbfb04a4989660d0c7f Mon Sep 17 00:00:00 2001 From: Stephen Scott Date: Tue, 4 Dec 2018 15:57:21 +0000 Subject: [PATCH] Core: change focus() to trigger("focus") 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 08352d41c..ccb8d4cbe 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" );