mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog Tests: Add test to ensure dialog keeps focus when clicking a modal overlay
This commit is contained in:
parent
d1505e3434
commit
e886e4a9c1
@ -355,4 +355,16 @@ test("#5184: isOpen in dialogclose event is true", function() {
|
|||||||
el.remove();
|
el.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("ensure dialog keeps focus when clicking modal overlay", function() {
|
||||||
|
expect( 2 );
|
||||||
|
|
||||||
|
var el = $( "<div></div>" ).dialog({
|
||||||
|
modal: true
|
||||||
|
});
|
||||||
|
ok( $(":focus").closest(".ui-dialog").length, "focus is in dialog" );
|
||||||
|
$(".ui-widget-overlay").simulate("mousedown");
|
||||||
|
ok( $(":focus").closest(".ui-dialog").length, "focus is still in dialog" );
|
||||||
|
el.remove();
|
||||||
|
});
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
Loading…
Reference in New Issue
Block a user