Set modal's mask-closable attribute to yes by default (#9313)

* Set modal's mask-closable attribute to yes by default

* Make backdrop closable only when field value is yes or empty
This commit is contained in:
Leilei332
2025-10-06 16:40:20 +01:00
committed by GitHub
parent e753851d49
commit ee23097816
+1 -1
View File
@@ -210,7 +210,7 @@ Modal.prototype.display = function(title,options) {
bodyWidgetNode.addEventListener("tm-close-tiddler",closeHandler,false);
footerWidgetNode.addEventListener("tm-close-tiddler",closeHandler,false);
// Whether to close the modal dialog when the mask (area outside the modal) is clicked
if(tiddler.fields && (tiddler.fields["mask-closable"] === "yes" || tiddler.fields["mask-closable"] === "true")) {
if(tiddler.fields && (tiddler.fields["mask-closable"] === "yes" || tiddler.fields["mask-closable"] === "true" || tiddler.fields["mask-closable"] === "" || "mask-closable" in tiddler.fields === false)) {
modalBackdrop.addEventListener("click",closeHandler,false);
}
// Set the initial styles for the message