fix(desktop-modal): close modal when clicking outside the title
This commit is contained in:
parent
b7657442de
commit
32496da7eb
1 changed files with 5 additions and 0 deletions
|
|
@ -1163,6 +1163,11 @@ class DesktopModal {
|
||||||
this.modal.find(".modal-dialog").attr("id", "desktop-modal");
|
this.modal.find(".modal-dialog").attr("id", "desktop-modal");
|
||||||
this.modal.find(".modal-body").addClass("desktop-modal-body");
|
this.modal.find(".modal-body").addClass("desktop-modal-body");
|
||||||
this.$child_icons_wrapper = this.modal.find(".desktop-modal-body");
|
this.$child_icons_wrapper = this.modal.find(".desktop-modal-body");
|
||||||
|
this.modal.find(".desktop-modal-heading").on("click", (e) => {
|
||||||
|
if (!$(e.target).closest(".modal-title").length) {
|
||||||
|
this.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.modal.find(".modal-title").text(icon_title);
|
this.modal.find(".modal-title").text(icon_title);
|
||||||
$(this.modal.find(".modal-body")).empty();
|
$(this.modal.find(".modal-body")).empty();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue