Skip to content
Permalink
Browse files

Dialog Tests: Add test to ensure dialog keeps focus when clicking a m…

…odal overlay
  • Loading branch information...
kborchers committed Jan 31, 2013
1 parent d1505e3 commit e886e4a9c1a23831f21df0b5a3bf43a01e0ffe1a
Showing with 12 additions and 0 deletions.
  1. +12 −0 tests/unit/dialog/dialog_events.js
@@ -355,4 +355,16 @@ test("#5184: isOpen in dialogclose event is true", function() {
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);

0 comments on commit e886e4a

Please sign in to comment.
You can’t perform that action at this time.