diff --git a/frontend/app/src/components/ModalContent.svelte b/frontend/app/src/components/ModalContent.svelte index 42419fbaf3..d0b7768130 100644 --- a/frontend/app/src/components/ModalContent.svelte +++ b/frontend/app/src/components/ModalContent.svelte @@ -61,9 +61,14 @@ style = `position: absolute; visibility: visible; top: ${top}px; `; if ($rtlStore) { - style += `right: ${window.innerWidth - alignTo.left + 8}px;`; + let right = Math.min( + window.innerWidth - alignTo.left + 8, + window.innerWidth - modalRect.width - 10 + ); + style += `right: ${right}px;`; } else { - style += `left: ${alignTo.right + 8}px;`; + let left = Math.min(alignTo.right + 8, window.innerWidth - (modalRect.width + 10)); + style += `left: ${left}px;`; } } } @@ -73,6 +78,7 @@ } +
{#if closeIcon} - +