mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Properly save and restore transition value on long slider shifts
This commit is contained in:
@ -62,6 +62,9 @@ const storage_keys = {
|
|||||||
font_scale: "TavernAI_font_scale",
|
font_scale: "TavernAI_font_scale",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const chat = document.getElementById('chat');
|
||||||
|
const chatTransition = window.getComputedStyle(chat).transition;
|
||||||
|
|
||||||
//Updated at the bottom of this script document based on 'focus' and 'blur' events
|
//Updated at the bottom of this script document based on 'focus' and 'blur' events
|
||||||
let browser_has_focus = true;
|
let browser_has_focus = true;
|
||||||
|
|
||||||
@ -117,8 +120,6 @@ async function applyFontScale() {
|
|||||||
power_user.font_scale = Number(localStorage.getItem(storage_keys.font_scale) ?? 1);
|
power_user.font_scale = Number(localStorage.getItem(storage_keys.font_scale) ?? 1);
|
||||||
|
|
||||||
// temporarily unset transition from chat to not make the browser calculate the animation
|
// temporarily unset transition from chat to not make the browser calculate the animation
|
||||||
const chat = document.getElementById('chat');
|
|
||||||
const chatTransition = window.getComputedStyle(chat).transition;
|
|
||||||
chat.style.transition = 'unset';
|
chat.style.transition = 'unset';
|
||||||
|
|
||||||
// now apply the font scale to the document
|
// now apply the font scale to the document
|
||||||
|
Reference in New Issue
Block a user