From 95574df1823bf08c78a27626039dd10a21ecb837 Mon Sep 17 00:00:00 2001 From: HighImKevin Date: Tue, 22 Sep 2026 17:35:24 -0400 Subject: [PATCH] Don't show dialog header when it's empty --- scripts/modal.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/modal.js b/scripts/modal.js index ce65539..e4a7ada 100644 --- a/scripts/modal.js +++ b/scripts/modal.js @@ -49,7 +49,7 @@ window.ModalSystem = (function() { || (fixedSize !== false && typeof window !== 'undefined' && window.innerWidth < 900); let _showCloseButton = showCloseButton; - if (window.innerWidth < 900) { + if (window.innerWidth < 900 && useFixedSize) { _showCloseButton = true; } @@ -111,7 +111,9 @@ window.ModalSystem = (function() { dialogHeader.appendChild(closeButton); } - dialog.appendChild(dialogHeader); + if (dialogHeader.childNodes.length > 0) { + dialog.appendChild(dialogHeader); + } // Create scrollable content area const dialogContent = document.createElement('div');