diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-07-30 12:59:33 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-07-30 12:59:33 -0400 |
commit | 90caa93a9b4b9b894b055cfb8dae0661ac7788b0 (patch) | |
tree | 690ffc4c6497359dea4b8f6689a315a2f4fe6afd /tests/unit/autocomplete | |
parent | 58ae7ce2fd20fb865c9087fb2eae0dbdb39fc9a7 (diff) | |
download | jquery-ui-90caa93a9b4b9b894b055cfb8dae0661ac7788b0.tar.gz jquery-ui-90caa93a9b4b9b894b055cfb8dae0661ac7788b0.zip |
Autocomplete: Respect the disabled option. Fixes #5619 - Autocomplete widget keeps looking for remote data even when it's disabled.
Diffstat (limited to 'tests/unit/autocomplete')
-rw-r--r-- | tests/unit/autocomplete/autocomplete_options.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js index ac4aeef35..2800fbab8 100644 --- a/tests/unit/autocomplete/autocomplete_options.js +++ b/tests/unit/autocomplete/autocomplete_options.js @@ -116,6 +116,24 @@ test("delay", function() { }, 100); }); +test("disabled", function() { + var ac = $("#autocomplete").autocomplete({ + source: data, + delay: 0, + disabled: true + }); + ac.val("ja").keydown(); + + same( $(".ui-menu:visible").length, 0 ); + + stop(); + setTimeout(function() { + same( $(".ui-menu:visible").length, 0 ); + ac.autocomplete("destroy"); + start(); + }, 50); +}); + test("minLength", function() { var ac = $("#autocomplete").autocomplete({ source: data |