mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix mobile screen funkiness by smashing it with a big hammer
Fixes #2879
This commit is contained in:
@@ -737,6 +737,16 @@ export function initRossMods() {
|
||||
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 () {
|
||||
var PrevAPI = main_api;
|
||||
setTimeout(() => RA_autoconnect(PrevAPI), 100);
|
||||
|
Reference in New Issue
Block a user