diff options
author | Brandon Aaron <brandon.aaron@gmail.com> | 2007-12-08 02:54:09 +0000 |
---|---|---|
committer | Brandon Aaron <brandon.aaron@gmail.com> | 2007-12-08 02:54:09 +0000 |
commit | 91f1299f68a68728467a2566a38845d82e30606f (patch) | |
tree | 9e138d0010419b458349e6f0f25ae973f7dc7946 /test/unit | |
parent | ffbedf0262b3eea906f39c0115b818d7456a3994 (diff) | |
download | jquery-91f1299f68a68728467a2566a38845d82e30606f.tar.gz jquery-91f1299f68a68728467a2566a38845d82e30606f.zip |
Fix for #1486. Prevent IE from throwing an error when triggering focus on hidden input.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/event.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/unit/event.js b/test/unit/event.js index e27530e1f..d0897e464 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -121,7 +121,7 @@ test("unbind(event)", function() { }); test("trigger(event, [data], [fn])", function() { - expect(66); + expect(67); var handler = function(event, a, b, c) { equals( event.type, "click", "check passed data" ); @@ -193,6 +193,16 @@ test("trigger(event, [data], [fn])", function() { // Trigger only the handlers (no native) and extra fn, with external event obj // Triggers 9 equals( $("#firstp").triggerHandler("click", [eventObj, 1, "2", "abc"], handler), "test", "Verify handler response" ); + + var pass = true; + try { + $('input:first') + .hide() + .trigger('focus'); + } catch(e) { + pass = false; + } + ok( pass, "Trigger focus on hidden element" ); // have the extra handler override the return // Triggers 9 |