]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete unit tests: Fix event handling in IE
authorjzaefferer <joern.zaefferer@gmail.com>
Tue, 13 Apr 2010 10:04:05 +0000 (12:04 +0200)
committerjzaefferer <joern.zaefferer@gmail.com>
Tue, 13 Apr 2010 10:04:05 +0000 (12:04 +0200)
tests/unit/autocomplete/autocomplete_events.js

index 28a72145e2dba9017b567e001c2fd83ff44d754d..a8924e192a4d831aaa258993aba100c2f51b9a37 100644 (file)
@@ -47,7 +47,7 @@ test("all events", function() {
                same( $(".ui-menu:visible").length, 1 );
                ac.simulate("keydown", { keyCode: $.ui.keyCode.DOWN });
                ac.simulate("keydown", { keyCode: $.ui.keyCode.ENTER });
-               ac.blur();
+               $.browser.msie ? ac.simulate("blur") : ac.blur();
        }, 50);
 });
 
@@ -63,7 +63,8 @@ test("change without selection", function() {
                        start();
                }
        });
-       ac.focus().val("ja").blur();
+       ac.triggerHandler("focus");
+       ac.val("ja").triggerHandler("blur");
 });
 
 test("cancel search", function() {