[modal] Add option to disable clicking the dimmer calling hideAll when allowMultiple = true#1438
[modal] Add option to disable clicking the dimmer calling hideAll when allowMultiple = true#1438Merlin04 wants to merge 1 commit intofomantic:developfrom
Conversation
…All 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 fomantic#1437
|
🤔 I am unsure, if your proposed solution is the way we should fix this. As you already pointed out (and as it is implemented for single modals already) the hideAll Method should check each of the other modals if its closable before hiding it via behaviors. (and should stop immediatly if one of them is not closable) |
|
That sounds like a better way to do it. I'm trying to implement it but it seems like |
|
Mmh, the current code reverses the found jquery modal elements to make sure it starts from the very top... Doesn't this work? |
|
It seems that it goes through them from the one furthest back, so I wouldn't be able to do the checking starting from the top. |
Description
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.
Testcase
I couldn't figure out how to create a testcase on JSFiddle but I tested it locally and it worked.
Closes
#1437