Skip to content

Commit

Permalink
Merge pull request #24 from michael-maltsev/native-click-to-close-cle…
Browse files Browse the repository at this point in the history
…anup

Redo changes that were scrambled in a merge conflict
  • Loading branch information
GedMarc authored May 1, 2020
2 parents eb058fa + 9ffa908 commit 8d9093f
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/js/bootstrap-dialog.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* global define */

/* ================================================
* Make use of Bootstrap's modal more monkey-friendly.
*
Expand Down Expand Up @@ -332,13 +334,6 @@

BootstrapDialog.METHODS_TO_OVERRIDE = {};
BootstrapDialog.METHODS_TO_OVERRIDE['v3.1'] = {
handleModalBackdropEvent: function () {
this.getModal().on('click', { dialog: this }, function (event) {
event.target === this && event.data.dialog.isClosable() && event.data.dialog.canCloseByBackdrop() && event.data.dialog.close();
});

return this;
},
/**
* To make multiple opened dialogs look better.
*
Expand Down Expand Up @@ -1152,13 +1147,6 @@

return this;
},
handleModalBackdropEvent: function () {
this.getModal().on('click', { dialog: this }, function (event) {
$(event.target).hasClass('modal-backdrop') && event.data.dialog.isClosable() && event.data.dialog.canCloseByBackdrop() && event.data.dialog.close();
});

return this;
},
isModalEvent: function (event) {
return typeof event.namespace !== 'undefined' && event.namespace === 'bs.modal';
},
Expand Down

0 comments on commit 8d9093f

Please sign in to comment.