jquery-ui/tests/unit/resizable/resizable_methods.js
Mike Sherov 4d67f4f349 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
2013-03-11 22:08:21 -04:00

22 lines
720 B
JavaScript

/*
* resizable_methods.js
*/
(function($) {
module( "resizable: methods" );
test( "disable", function() {
expect( 5 );
var element = $( "#resizable1" ).resizable({ disabled: false }),
chainable = element.resizable( "disable" );
ok( !element.resizable( "widget" ).hasClass( "ui-state-disabled" ), "element does not get ui-state-disabled" );
ok( !element.resizable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" );
ok( element.resizable( "widget" ).hasClass( "ui-resizable-disabled" ), "element gets ui-resizable-disabled" );
equal( element.resizable( "option", "disabled" ), true, "disabled option setter" );
equal( chainable, element, "disable is chainable" );
});
})(jQuery);