mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2026-09-02 21:04:08 +03:00
refactor: replace overflow-y with scrollbar-gutter (#2849)
The new scrollbar-gutter CSS property fixes the jump that appeared when the scrollbar was created/disposed See https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/scrollbar-gutter Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="no-forced-scrollbar">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
* {
|
||||
font-family: var(--j-font-family), sans-serif, system-ui !important;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
html {
|
||||
scrollbar-gutter: stable both-edges;
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
|
||||
html.no-forced-scrollbar {
|
||||
overflow-y: unset !important;
|
||||
}
|
||||
|
||||
/* Custom utility classes */
|
||||
|
||||
.link {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { BaseItemDto } from '@jellyfin/sdk/lib/generated-client';
|
||||
import { computed, onBeforeMount, onUnmounted, provide, ref, watch } from 'vue';
|
||||
import { computed, provide, ref, watch } from 'vue';
|
||||
import { useDisplay } from 'vuetify';
|
||||
import type { DrawerItem } from '#/components/Layout/Navigation/NavigationDrawer.vue';
|
||||
import { playbackManager } from '#/store/playback-manager.ts';
|
||||
@@ -43,10 +43,4 @@ watch(display.mobile, () => {
|
||||
});
|
||||
|
||||
provide('NavigationDrawer', navDrawer);
|
||||
onBeforeMount(() => {
|
||||
document.documentElement.classList.remove('no-forced-scrollbar');
|
||||
});
|
||||
onUnmounted(() => {
|
||||
document.documentElement.classList.add('no-forced-scrollbar');
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user