forked from jquery/jquery-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dialog: find the highest zIndex dialog with overlay to close on ESC k…
…ey. Fixed #5356 - ESC key problem * along the way fixed a related bug with more than one dialog getting closed * added visual test case
- Loading branch information
1 parent
75329fa
commit 5cae674
Showing
2 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Dialog Visual Test : Ticket 5365 - ESC key problem</title> | ||
<link rel="stylesheet" href="../visual.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css"> | ||
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script> | ||
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script> | ||
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script> | ||
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script> | ||
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script> | ||
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script> | ||
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script> | ||
<script type="text/javascript" src="../../../ui/jquery.ui.resizable.js"></script> | ||
<script type="text/javascript" src="../../../ui/jquery.ui.dialog.js"></script> | ||
<script type="text/javascript"> | ||
$(function() { | ||
var dialogsCount = 0; | ||
var openModal = function() { | ||
dialogsCount++; | ||
$('<div></div>').append('<p> Dialog' + dialogsCount + ' Conent') | ||
.dialog({ | ||
modal: true, | ||
buttons: { | ||
"Close": function(){$(this).dialog('close');}, | ||
"OpenNew": openModal | ||
} | ||
}) | ||
} | ||
openModal(); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5cae674
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling event.stopPropagation() makes customizing behavior difficult. Can you try to find another way to handle this? Thanks.