mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-14 20:35:47 +01:00
Core: change focus() to trigger("focus") (#2243)
Change focus() to trigger("focus") so that jQuery Migrate 3.x doesn't flag it as deprecated.
This commit is contained in:
committed by
Brahim Arkni
parent
d1c73fe289
commit
a9c20ec280
@@ -602,7 +602,7 @@ $.extend( $.validator, {
|
|||||||
try {
|
try {
|
||||||
$( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
|
$( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
|
||||||
.filter( ":visible" )
|
.filter( ":visible" )
|
||||||
.focus()
|
.trigger( "focus" )
|
||||||
|
|
||||||
// Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
|
// Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
|
||||||
.trigger( "focusin" );
|
.trigger( "focusin" );
|
||||||
|
|||||||
Reference in New Issue
Block a user