Skip to content

Commit bed6def

Browse files
committed
Autocomplete tests: Fixed various bugs in various versions of IE.
1 parent c2f9677 commit bed6def

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/unit/autocomplete/autocomplete_events.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ test("all events", function() {
4747
same( $(".ui-menu:visible").length, 1 );
4848
ac.simulate("keydown", { keyCode: $.ui.keyCode.DOWN });
4949
ac.simulate("keydown", { keyCode: $.ui.keyCode.ENTER });
50-
$.browser.msie ? ac.simulate("blur") : ac.blur();
50+
// blurring through jQuery causes a bug in IE 6 which causes the
51+
// autocompletechange event to occur twice
52+
ac[0].blur();
5153
}, 50);
5254
});
5355

@@ -87,7 +89,9 @@ test("all events - contenteditable", function() {
8789
same( $(".ui-menu:visible").length, 1 );
8890
ac.simulate("keydown", { keyCode: $.ui.keyCode.DOWN });
8991
ac.simulate("keydown", { keyCode: $.ui.keyCode.ENTER });
90-
$.browser.msie ? ac.simulate("blur") : ac.blur();
92+
// blurring through jQuery causes a bug in IE 6 which causes the
93+
// autocompletechange event to occur twice
94+
ac[0].blur();
9195
}, 50);
9296
});
9397

0 commit comments

Comments
 (0)