aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2013-11-14 16:33:12 -0500
committerDave Methvin <dave.methvin@gmail.com>2013-11-14 16:33:12 -0500
commitc2aca17d457d302cb1683f925b9e5ee93f0984ea (patch)
tree63c6f6d9daf39e98cb66a387342ccc35819436cf /test
parent498e0e6c9bf486a0b1f16b455d65fcbc6c43867e (diff)
downloadjquery-c2aca17d457d302cb1683f925b9e5ee93f0984ea.tar.gz
jquery-c2aca17d457d302cb1683f925b9e5ee93f0984ea.zip
Ref #14180, let focusin/out work on non-element targets.
Diffstat (limited to 'test')
-rw-r--r--test/unit/event.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index a18f2f673..334dc6b1c 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -2374,6 +2374,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);