fix(desktop-modal): close modal when clicking outside the title

This commit is contained in:
KerollesFathy 2026-05-02 19:29:30 +00:00
parent b7657442de
commit 32496da7eb

View file

@ -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();