Fix mobile screen funkiness by smashing it with a big hammer Fixes #2879
| @@ -103,7 +103,6 @@ | ||
| 103 | 103 | touch-action: none; |
| 104 | 104 | overflow: hidden; |
| 105 | 105 | position: fixed; |
| 106 | - | |
| 107 | 106 | } |
| 108 | 107 | |
| 109 | 108 | .world_entry_form_control { |
| @@ -112,7 +111,7 @@ | ||
| 112 | 111 | |
| 113 | 112 | .drawer-content { |
| 114 | 113 | min-width: unset; |
| 115 | 114 | width: 100%100dvw; |
| 116 | 115 | max-height: calc(100vh - 45px); |
| 117 | 116 | max-height: calc(100dvh - 45px); |
| 118 | 117 | position: fixed; |
| @@ -159,9 +158,9 @@ | ||
| 159 | 158 | #sheld, |
| 160 | 159 | #character_popup, |
| 161 | 160 | .drawer-content { |
| 162 | 161 | width: 100%100dvw !important; |
| 163 | 162 | margin: 0 auto; |
| 164 | 163 | max-width: 100%100dvw; |
| 165 | 164 | left: 0 !important; |
| 166 | 165 | resize: none !important; |
| 167 | 166 | top: var(--topBarBlockSize); |
| @@ -233,9 +232,9 @@ | ||
| 233 | 232 | /* 100vh are fallback units for browsers that don't support dvh */ |
| 234 | 233 | height: calc(100vh - 45px); |
| 235 | 234 | height: calc(100dvh - 45px); |
| 236 | 235 | min-width: 100%100dvw !important; |
| 237 | 236 | width: 100%100dvw !important; |
| 238 | 237 | max-width: 100%100dvw !important; |
| 239 | 238 | overflow-y: hidden; |
| 240 | 239 | border-left: 1px solid var(--SmartThemeBorderColor); |
| 241 | 240 | border-right: 1px solid var(--SmartThemeBorderColor); |
| @@ -481,10 +480,10 @@ | ||
| 481 | 480 | margin: 0 auto; |
| 482 | 481 | height: calc(100vh - 70px); |
| 483 | 482 | height: calc(100dvh - 70px); |
| 484 | 483 | width: calc(100%100dvw - 5px); |
| 485 | 484 | max-height: calc(100vh - 70px); |
| 486 | 485 | max-height: calc(100dvh - 70px); |
| 487 | 486 | max-width: calc(100%100dvw - 5px); |
| 488 | 487 | |
| 489 | 488 | } |
| 490 | 489 | |
| @@ -502,4 +501,4 @@ | ||
| 502 | 501 | #horde_model { |
| 503 | 502 | height: unset; |
| 504 | 503 | } |
| 505 | -} | |
| 505 | \ No newline at end of file | |
| 504 | +} | |
| @@ -737,6 +737,16 @@ export function initRossMods() { | ||
| 737 | 737 | RA_autoconnect(); |
| 738 | 738 | } |
| 739 | 739 | |
| 740 | + if (isMobile()) { | |
| 741 | + const fixFunkyPositioning = () => { | |
| 742 | + console.debug('[Mobile] Device viewport change detected.'); | |
| 743 | + document.documentElement.style.position = 'fixed'; | |
| 744 | + requestAnimationFrame(() => document.documentElement.style.position = ''); | |
| 745 | + }; | |
| 746 | + window.addEventListener('resize', fixFunkyPositioning); | |
| 747 | + window.addEventListener('orientationchange', fixFunkyPositioning); | |
| 748 | + } | |
| 749 | + | |
| 740 | 750 | $('#main_api').change(function () { |
| 741 | 751 | var PrevAPI = main_api; |
| 742 | 752 | setTimeout(() => RA_autoconnect(PrevAPI), 100); |