diff options
author | Scott González <scott.gonzalez@gmail.com> | 2013-03-14 19:08:21 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-03-14 19:08:21 -0400 |
commit | 44d07173db32b498e5f83f60db290ff1463daee3 (patch) | |
tree | 59537f38aae5d3aed4a1a491d0ebfb3635ba8768 /tests/unit/autocomplete/autocomplete_options.js | |
parent | db27541b3ccc8af8c558915d99bcf544d4afacc7 (diff) | |
download | jquery-ui-44d07173db32b498e5f83f60db290ff1463daee3.tar.gz jquery-ui-44d07173db32b498e5f83f60db290ff1463daee3.zip |
Widget: Stop setting ui-state-disabled and aria by default on setting disabled option.
Fixes #5973 - Resizable: disabled should not have the ui-state-disabled class or aria attribute aria-disabled
Fixes #5974 - Draggable: disabled should not have the ui-state-disabled class or aria attribute aria-disabled
Fixes #6039 - Droppable: disabled should not have ui-state-disabled
This reverts commit 23771d38ba9d2663f6db0243c8e992dc7ff6844a.
Diffstat (limited to 'tests/unit/autocomplete/autocomplete_options.js')
-rw-r--r-- | tests/unit/autocomplete/autocomplete_options.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js index 9f0bd2d43..c98f2c28e 100644 --- a/tests/unit/autocomplete/autocomplete_options.js +++ b/tests/unit/autocomplete/autocomplete_options.js @@ -88,17 +88,20 @@ asyncTest( "delay", function() { }); asyncTest( "disabled", function() { - expect( 2 ); + expect( 5 ); var element = $( "#autocomplete" ).autocomplete({ source: data, - delay: 0, - disabled: true + delay: 0 }), - menu = element.autocomplete( "widget" ); + menu = element.autocomplete( "disable" ).autocomplete( "widget" ); element.val( "ja" ).keydown(); ok( menu.is( ":hidden" ) ); + ok( !element.is( ".ui-state-disabled" ), "element doesn't get ui-state-disabled" ); + ok( !element.attr( "aria-disabled" ), "element doesn't get aria-disabled" ); + ok( menu.is( ".ui-autocomplete-disabled" ), "element gets ui-autocomplete-disabled" ); + setTimeout(function() { ok( menu.is( ":hidden" ) ); start(); |