From c14bb6124e95fe5eef67b7546920278cc416ca3b Mon Sep 17 00:00:00 2001 From: merlin04 Date: Sat, 25 Apr 2020 14:04:09 -0700 Subject: [PATCH] : add option to disable clicking the dimmer calling hideAll when allowMultiple = true Add a new option, multipleHideAll, which when false makes clicking the dimmer when multiple modals have allowMultiple = true hide only the modal at the front. When true (the default) the previous behavior is used, i.e. hiding all of the open modals. Closes #1437 --- src/definitions/modules/modal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 420ecc250b..7384f9d180 100755 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -313,7 +313,7 @@ $.fn.modal = function(parameters) { ; if(!isInModal && isInDOM && module.is.active() && $module.hasClass(className.front) ) { module.debug('Dimmer clicked, hiding all modals'); - if(settings.allowMultiple) { + if(settings.allowMultiple && settings.multipleHideAll) { if(!module.hideAll()) { return; } @@ -1133,6 +1133,7 @@ $.fn.modal.settings = { observeChanges : false, allowMultiple : false, + multipleHideAll: true, detachable : true, closable : true, autofocus : true,