aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkborchers <k_borchers@yahoo.com>2011-05-10 09:54:13 -0500
committerkborchers <k_borchers@yahoo.com>2011-05-10 09:54:13 -0500
commita63d23c3145a88386b8274e3929630b2416d7f87 (patch)
tree4d7dd2565b98047f0ac06851a9dc01fa76a2b2aa
parentce6209b4e492d769839bec490cc7323e4f4faed9 (diff)
downloadjquery-ui-a63d23c3145a88386b8274e3929630b2416d7f87.tar.gz
jquery-ui-a63d23c3145a88386b8274e3929630b2416d7f87.zip
Autocomplete: Added unit test to check for preventing value change when an unintended mouseover event (Firefox) is fired before blur. Proposed fix is in pull request 236
-rw-r--r--tests/unit/autocomplete/autocomplete_events.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unit/autocomplete/autocomplete_events.js b/tests/unit/autocomplete/autocomplete_events.js
index 35103d89b..eb009064c 100644
--- a/tests/unit/autocomplete/autocomplete_events.js
+++ b/tests/unit/autocomplete/autocomplete_events.js
@@ -203,4 +203,20 @@ test("cancel select", function() {
}, 50);
});
+test("blur without selection", function() {
+ expect(1);
+ var ac = $("#autocomplete").autocomplete({
+ delay: 0,
+ source: data
+ });
+ stop();
+ ac.val("j").keydown();
+ setTimeout(function() {
+ $( ".ui-menu-item" ).first().simulate("mouseover");
+ ac.simulate("keydown", { keyCode: $.ui.keyCode.TAB });
+ same( ac.val(), "j" );
+ start();
+ }, 50);
+});
+
})(jQuery);