Skip to content

Commit a9c20ec

Browse files
sassquadArkni
authored andcommitted
Core: change focus() to trigger("focus") (jquery-validation#2243)
Change focus() to trigger("focus") so that jQuery Migrate 3.x doesn't flag it as deprecated.
1 parent d1c73fe commit a9c20ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ $.extend( $.validator, {
602602
try {
603603
$( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
604604
.filter( ":visible" )
605-
.focus()
605+
.trigger( "focus" )
606606

607607
// Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
608608
.trigger( "focusin" );

0 commit comments

Comments
 (0)