From bed6def5c02e6aeb713c0fe679b09ed02c6babb0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 24 Feb 2011 22:54:54 +0100 Subject: [PATCH] Autocomplete tests: Fixed various bugs in various versions of IE. --- tests/unit/autocomplete/autocomplete_events.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unit/autocomplete/autocomplete_events.js b/tests/unit/autocomplete/autocomplete_events.js index b0ee1acb4..20fdb8471 100644 --- a/tests/unit/autocomplete/autocomplete_events.js +++ b/tests/unit/autocomplete/autocomplete_events.js @@ -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); }); -- 2.39.5