mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Core tests: Split .focus() test into two tests to avoid bug in IE with stop() and start().
This commit is contained in:
parent
d8c6c32b87
commit
23d4eb5372
@ -5,27 +5,27 @@
|
|||||||
|
|
||||||
module('core - jQuery extensions');
|
module('core - jQuery extensions');
|
||||||
|
|
||||||
test('focus', function() {
|
test('focus - original functionality', function() {
|
||||||
expect(3);
|
expect(1);
|
||||||
|
|
||||||
var el = $('#inputTabindex0'),
|
$('#inputTabindex0')
|
||||||
// used to remove focus from the main element
|
.focus(function() {
|
||||||
other = $('#inputTabindex10');
|
ok(true, 'event triggered');
|
||||||
|
})
|
||||||
|
.focus();
|
||||||
|
});
|
||||||
|
|
||||||
// test original functionality
|
asyncTest('focus', function() {
|
||||||
el.focus(function() {
|
expect(2);
|
||||||
ok(true, 'event triggered');
|
$('#inputTabindex0')
|
||||||
});
|
.focus(function() {
|
||||||
el.focus();
|
ok(true, 'event triggered');
|
||||||
other.focus();
|
})
|
||||||
|
.focus(500, function() {
|
||||||
// trigger event handler + callback
|
ok(true, 'callback triggered');
|
||||||
stop();
|
$(this).unbind('focus');
|
||||||
el.focus(500, function() {
|
start();
|
||||||
ok(true, 'callback triggered');
|
});
|
||||||
start();
|
|
||||||
});
|
|
||||||
other.focus();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('zIndex', function() {
|
test('zIndex', function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user