FIX: clicking a button that disappears in a modal would close the modal (take 2)

This commit is contained in:
Régis Hanol 2014-09-09 10:44:26 +02:00
parent 357c43e941
commit 69bc24a16d
1 changed files with 2 additions and 4 deletions

View File

@ -5,10 +5,8 @@ export default Ember.View.extend({
click: function(e) {
var $target = $(e.target);
// some buttons get removed from the DOM when you click on them.
// we don't want to close the modal when we click on those...
if ($target.parent().length > 0 &&
$target.closest('.modal-inner-container').length === 0) {
if ($target.hasClass("modal-middle-container") ||
$target.hasClass("modal-outer-container")) {
// Delegate click to modal backdrop if clicked outside. We do this
// because some CSS of ours seems to cover the backdrop and makes it
// unclickable.