jquery-ui/tests/unit/button/core.js
Alexander Schmitz 02033262ee Button: Initial commit of button re-factor
Move to using element stats rather then js class states remove
ui-button-text spans.
Removed button set
2015-10-07 10:57:59 -04:00

24 lines
482 B
JavaScript

define( [
"jquery",
"ui/widgets/button"
], function( $ ) {
module( "Button: core" );
asyncTest( "Disabled button loses focus", function() {
expect( 2 );
var element = $( "#button" ).button();
element.focus();
setTimeout( function() {
equal( element[ 0 ], $.ui.safeActiveElement( document ), "Button is focused" );
element.button( "disable" );
notEqual( element[ 0 ], $.ui.safeActiveElement( document ), "Button has had focus removed" );
start();
} );
} );
} );