Add comment

This commit is contained in:
Cohee 2023-09-28 21:33:03 +03:00
parent f0b48aabff
commit 977421edb7
1 changed files with 2 additions and 0 deletions

View File

@ -527,6 +527,8 @@ function applyChatWidth(type) {
} else {
//this is to prevent the slider from updating page in real time
$("#chat_width_slider").off('mouseup touchend').on('mouseup touchend', async () => {
// This is a hack for Firefox to let it render before applying the block width.
// Otherwise it takes the incorrect slider position with the new value AFTER the resizing.
await delay(1);
document.documentElement.style.setProperty('--sheldWidth', `${power_user.chat_width}vw`);
await delay(1);