diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2011-03-31 09:10:30 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2011-03-31 09:10:30 -0400 |
commit | 459bd7f89d112dd6aec97bfd1923bb7d4337243c (patch) | |
tree | d97dda4bf921920ab369b8133da4891013fbcadb /test | |
parent | 6c28a394c2174c51196cd9ac073b819fc79adb3b (diff) | |
download | jquery-459bd7f89d112dd6aec97bfd1923bb7d4337243c.tar.gz jquery-459bd7f89d112dd6aec97bfd1923bb7d4337243c.zip |
Followup commit for #7340 test case; make sure second test fires properly on IE by focusing to another element rather than blurring off the first.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/event.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/unit/event.js b/test/unit/event.js index 1e40e0f3e..2a6d8a669 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -1981,7 +1981,7 @@ test("window resize", function() { }); test("focusin bubbles", function() { - expect(4); + expect(5); var input = jQuery( '<input type="text" />' ).prependTo( "body" ), order = 0; @@ -1996,9 +1996,14 @@ test("focusin bubbles", function() { // DOM focus method input[0].focus(); + + // To make the next focus test work, we need to take focus off the input. + // This will fire another focusin event, so set order to reflect that. + order = 1; + jQuery("#text1")[0].focus(); + // jQuery trigger, which calls DOM focus order = 0; - input[0].blur(); input.trigger( "focus" ); input.remove(); |