]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete tests: Fixed various bugs in various versions of IE.
authorScott González <scott.gonzalez@gmail.com>
Thu, 24 Feb 2011 21:54:54 +0000 (22:54 +0100)
committerScott González <scott.gonzalez@gmail.com>
Thu, 24 Feb 2011 21:55:24 +0000 (22:55 +0100)
tests/unit/autocomplete/autocomplete_events.js

index b0ee1acb4e6db33b5075ef515016a8f08e14c8f3..20fdb8471746d2db757994c3210720d2e647905e 100644 (file)
@@ -47,7 +47,9 @@ test("all events", function() {
                same( $(".ui-menu:visible").length, 1 );
                ac.simulate("keydown", { keyCode: $.ui.keyCode.DOWN });
                ac.simulate("keydown", { keyCode: $.ui.keyCode.ENTER });
-               $.browser.msie ? ac.simulate("blur") : ac.blur();
+               // blurring through jQuery causes a bug in IE 6 which causes the
+               // autocompletechange event to occur twice
+               ac[0].blur();
        }, 50);
 });
 
@@ -87,7 +89,9 @@ test("all events - contenteditable", function() {
                same( $(".ui-menu:visible").length, 1 );
                ac.simulate("keydown", { keyCode: $.ui.keyCode.DOWN });
                ac.simulate("keydown", { keyCode: $.ui.keyCode.ENTER });
-               $.browser.msie ? ac.simulate("blur") : ac.blur();
+               // blurring through jQuery causes a bug in IE 6 which causes the
+               // autocompletechange event to occur twice
+               ac[0].blur();
        }, 50);
 });