From: André Peters Date: Sat, 2 Nov 2019 07:40:37 +0000 (+0100) Subject: Remove prev form when clicking outside the modal X-Git-Tag: 2.2~101^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3132%2Fhead;p=thirdparty%2Frspamd.git Remove prev form when clicking outside the modal 1. Function is triggered by click on close button **and** by clicking anywhere outside the modal to close it. 2. Form is being removed instead of hidden. --- diff --git a/interface/js/app/config.js b/interface/js/app/config.js index 701640f915..2e0b955cbc 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -203,8 +203,8 @@ define(["jquery"], return false; }); // close modal without saving - $("[data-dismiss=\"modal\"]").on("click", function () { - $("#modalBody form").hide(); + $("#modalDialog").on('hidden.bs.modal', function () { + $("#modalBody form").remove(); }); // @save forms from modal function saveMap(server) {