mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Ref #14180, let focusin/out work on non-element targets.
(cherry picked from commit c2aca17d45)
Conflicts:
src/event.js
This commit is contained in:
@@ -2462,6 +2462,19 @@ test("fixHooks extensions", function() {
|
||||
jQuery.event.fixHooks.click = saved;
|
||||
});
|
||||
|
||||
test( "focusin using non-element targets", function() {
|
||||
expect( 2 );
|
||||
|
||||
jQuery( document ).on( "focusin", function( e ) {
|
||||
ok( e.type === "focusin", "got a focusin event on a document" );
|
||||
}).trigger( "focusin" ).off( "focusin" );
|
||||
|
||||
jQuery( window ).on( "focusin", function( e ) {
|
||||
ok( e.type === "focusin", "got a focusin event on a window" );
|
||||
}).trigger( "focusin" ).off( "focusin" );
|
||||
|
||||
});
|
||||
|
||||
testIframeWithCallback( "focusin from an iframe", "event/focusinCrossFrame.html", function( frameDoc ) {
|
||||
expect(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user