diff --git a/src/systems/dashboard/confirmDialog.js b/src/systems/dashboard/confirmDialog.js index 0acdacd..7a4c969 100644 --- a/src/systems/dashboard/confirmDialog.js +++ b/src/systems/dashboard/confirmDialog.js @@ -46,7 +46,7 @@ export function showConfirmDialog(options) { if (!bodyModalsContainer) { bodyModalsContainer = document.createElement('div'); bodyModalsContainer.id = 'document-body-modals'; - bodyModalsContainer.style.cssText = 'position: fixed; inset: 0; pointer-events: none; z-index: 10000;'; + bodyModalsContainer.style.cssText = 'position: fixed; inset: 0; pointer-events: none; z-index: 10000; display: flex; align-items: center; justify-content: center;'; document.body.appendChild(bodyModalsContainer); } bodyModalsContainer.appendChild(modal); @@ -171,7 +171,7 @@ export function showAlertDialog(options) { if (!bodyModalsContainer) { bodyModalsContainer = document.createElement('div'); bodyModalsContainer.id = 'document-body-modals'; - bodyModalsContainer.style.cssText = 'position: fixed; inset: 0; pointer-events: none; z-index: 10000;'; + bodyModalsContainer.style.cssText = 'position: fixed; inset: 0; pointer-events: none; z-index: 10000; display: flex; align-items: center; justify-content: center;'; document.body.appendChild(bodyModalsContainer); } bodyModalsContainer.appendChild(modal); diff --git a/style.css b/style.css index 81747f5..137229d 100644 --- a/style.css +++ b/style.css @@ -1689,9 +1689,16 @@ body:has(.rpg-panel.rpg-position-left) #sheld { /* Mobile-specific modal adjustments */ @media (max-width: 768px) { + /* Fix viewport height for mobile browsers with dynamic toolbars */ + #document-body-modals, + .rpg-modal { + height: 100dvh; /* Dynamic viewport height accounts for mobile browser chrome */ + } + /* General modal content adjustments */ .rpg-modal-content { max-height: 85vh; /* Better mobile viewport handling (accounts for browser chrome) */ + max-height: 85dvh; /* Use dynamic viewport height if supported */ max-width: calc(100vw - 2rem); /* Prevent horizontal overflow */ }