mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-13 10:42:55 +01:00
Fix mobile screen funkiness by smashing it with a big hammer
Fixes #2879
This commit is contained in:
parent
6d32cd6bf0
commit
2b10954002
@ -103,7 +103,6 @@
|
|||||||
touch-action: none;
|
touch-action: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.world_entry_form_control {
|
.world_entry_form_control {
|
||||||
@ -112,7 +111,7 @@
|
|||||||
|
|
||||||
.drawer-content {
|
.drawer-content {
|
||||||
min-width: unset;
|
min-width: unset;
|
||||||
width: 100%;
|
width: 100dvw;
|
||||||
max-height: calc(100vh - 45px);
|
max-height: calc(100vh - 45px);
|
||||||
max-height: calc(100dvh - 45px);
|
max-height: calc(100dvh - 45px);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -159,9 +158,9 @@
|
|||||||
#sheld,
|
#sheld,
|
||||||
#character_popup,
|
#character_popup,
|
||||||
.drawer-content {
|
.drawer-content {
|
||||||
width: 100% !important;
|
width: 100dvw !important;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: 100%;
|
max-width: 100dvw;
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
resize: none !important;
|
resize: none !important;
|
||||||
top: var(--topBarBlockSize);
|
top: var(--topBarBlockSize);
|
||||||
@ -233,9 +232,9 @@
|
|||||||
/* 100vh are fallback units for browsers that don't support dvh */
|
/* 100vh are fallback units for browsers that don't support dvh */
|
||||||
height: calc(100vh - 45px);
|
height: calc(100vh - 45px);
|
||||||
height: calc(100dvh - 45px);
|
height: calc(100dvh - 45px);
|
||||||
min-width: 100% !important;
|
min-width: 100dvw !important;
|
||||||
width: 100% !important;
|
width: 100dvw !important;
|
||||||
max-width: 100% !important;
|
max-width: 100dvw !important;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
border-left: 1px solid var(--SmartThemeBorderColor);
|
border-left: 1px solid var(--SmartThemeBorderColor);
|
||||||
border-right: 1px solid var(--SmartThemeBorderColor);
|
border-right: 1px solid var(--SmartThemeBorderColor);
|
||||||
@ -481,10 +480,10 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
height: calc(100vh - 70px);
|
height: calc(100vh - 70px);
|
||||||
height: calc(100dvh - 70px);
|
height: calc(100dvh - 70px);
|
||||||
width: calc(100% - 5px);
|
width: calc(100dvw - 5px);
|
||||||
max-height: calc(100vh - 70px);
|
max-height: calc(100vh - 70px);
|
||||||
max-height: calc(100dvh - 70px);
|
max-height: calc(100dvh - 70px);
|
||||||
max-width: calc(100% - 5px);
|
max-width: calc(100dvw - 5px);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,4 +501,4 @@
|
|||||||
#horde_model {
|
#horde_model {
|
||||||
height: unset;
|
height: unset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -737,6 +737,16 @@ export function initRossMods() {
|
|||||||
RA_autoconnect();
|
RA_autoconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isMobile()) {
|
||||||
|
const fixFunkyPositioning = () => {
|
||||||
|
console.debug('[Mobile] Device viewport change detected.');
|
||||||
|
document.documentElement.style.position = 'fixed';
|
||||||
|
requestAnimationFrame(() => document.documentElement.style.position = '');
|
||||||
|
};
|
||||||
|
window.addEventListener('resize', fixFunkyPositioning);
|
||||||
|
window.addEventListener('orientationchange', fixFunkyPositioning);
|
||||||
|
}
|
||||||
|
|
||||||
$('#main_api').change(function () {
|
$('#main_api').change(function () {
|
||||||
var PrevAPI = main_api;
|
var PrevAPI = main_api;
|
||||||
setTimeout(() => RA_autoconnect(PrevAPI), 100);
|
setTimeout(() => RA_autoconnect(PrevAPI), 100);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user