mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-20 20:13:40 +03:00
52 lines
1.4 KiB
JavaScript
52 lines
1.4 KiB
JavaScript
(function( $ ) {
|
|
|
|
module( "core - deprecated" );
|
|
|
|
asyncTest( "focus - original functionality", function() {
|
|
expect( 1 );
|
|
$( "#inputTabindex0" )
|
|
.one( "focus", function() {
|
|
ok( true, "event triggered" );
|
|
start();
|
|
})
|
|
.focus();
|
|
});
|
|
|
|
asyncTest( "focus", function() {
|
|
expect( 2 );
|
|
|
|
// support: IE 8
|
|
// IE sometimes gets confused about what's focused if we don't explicitly
|
|
// focus a different element first
|
|
$( "body" ).focus();
|
|
|
|
$( "#inputTabindex0" )
|
|
.one( "focus", function() {
|
|
ok( true, "event triggered" );
|
|
start();
|
|
})
|
|
.focus( 500, function() {
|
|
ok( true, "callback triggered" );
|
|
});
|
|
});
|
|
|
|
test( "zIndex", function() {
|
|
expect( 7 );
|
|
var el = $( "#zIndexAutoWithParent" ),
|
|
parent = el.parent();
|
|
equal( el.zIndex(), 100, "zIndex traverses up to find value" );
|
|
equal( parent.zIndex(200 ), parent, "zIndex setter is chainable" );
|
|
equal( el.zIndex(), 200, "zIndex setter changed zIndex" );
|
|
|
|
el = $( "#zIndexAutoWithParentViaCSS" );
|
|
equal( el.zIndex(), 0, "zIndex traverses up to find CSS value, not found because not positioned" );
|
|
|
|
el = $( "#zIndexAutoWithParentViaCSSPositioned" );
|
|
equal( el.zIndex(), 100, "zIndex traverses up to find CSS value" );
|
|
el.parent().zIndex( 200 );
|
|
equal( el.zIndex(), 200, "zIndex setter changed zIndex, overriding CSS" );
|
|
|
|
equal( $( "#zIndexAutoNoParent" ).zIndex(), 0, "zIndex never explicitly set in hierarchy" );
|
|
});
|
|
|
|
})( jQuery );
|