Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #565 from adobe/nj/issue-554
Browse files Browse the repository at this point in the history
Fix exception when canceling open dialogs (bug #554)
  • Loading branch information
peterflynn committed Apr 5, 2012
2 parents bbf4dbf + 9ab758b commit a0579aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/widgets/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ define(function (require, exports, module) {
* be called with the special buttonId DIALOG_CANCELED (note: callback is run asynchronously).
*/
function cancelModalDialogIfOpen(dlgClass) {
$("." + dlgClass + ".instance").each(function (dlg) {
if (dlg.is(":visible")) { // Bootstrap breaks if try to hide dialog that's already hidden
_dismissDialog(dlg, DIALOG_CANCELED);
$("." + dlgClass + ".instance").each(function (index, dlg) {
if ($(dlg).is(":visible")) { // Bootstrap breaks if try to hide dialog that's already hidden
_dismissDialog($(dlg), DIALOG_CANCELED);
}
});
}
Expand Down

0 comments on commit a0579aa

Please sign in to comment.