Skip to content

Commit 6404bfe

Browse files
committed
fix(player): scrollbar styles not applying on chromium 121+
1 parent 4217dfe commit 6404bfe

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

packages/vidstack/player/styles/default/menus.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@
5959
}
6060

6161
:where(.vds-menu-items) {
62+
--vds-scrollbar-thumb: var(--media-menu-scrollbar-thumb-bg, rgb(245 245 245 / 0.1));
6263
box-sizing: border-box;
6364
min-width: var(--media-menu-min-width, 280px);
6465
scrollbar-width: thin;
66+
scrollbar-color: var(--vds-scrollbar-thumb) var(--media-menu-scrollbar-track-bg, transparent);
6567
}
6668

6769
:where(.vds-menu-items)::-webkit-scrollbar {
@@ -77,12 +79,12 @@
7779
}
7880

7981
:where(.vds-menu-items)::-webkit-scrollbar-thumb {
80-
background-color: var(--media-menu-scrollbar-thumb-bg, rgb(245 245 245 / 0.1));
82+
background-color: var(--vds-scrollbar-thumb);
8183
border-radius: 4px;
8284
}
8385

8486
:where(.vds-menu-items)::-webkit-scrollbar-corner {
85-
background-color: var(--media-menu-scrollbar-thumb-bg, rgb(245 245 245 / 0.1));
87+
background-color: var(--vds-scrollbar-thumb);
8688
}
8789

8890
/*
@@ -162,7 +164,7 @@
162164
backdrop-filter: blur(4px);
163165
height: var(--menu-height, auto);
164166
will-change: width, height;
165-
overflow-y: scroll;
167+
overflow-y: auto;
166168
overscroll-behavior: contain;
167169
opacity: 0;
168170
z-index: 9999999;
@@ -181,6 +183,7 @@
181183
:where(.vds-menu-items[data-resizing]) {
182184
--media-menu-scrollbar-thumb-bg: rgba(0, 0, 0, 0);
183185
pointer-events: none;
186+
overflow: hidden;
184187
}
185188

186189
/*

packages/vidstack/src/components/ui/menu/menu.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,12 @@ export class Menu extends Component<MenuProps, {}, MenuEvents> {
473473
}
474474
}
475475

476-
requestAnimationFrame(() => {
477-
setStyle(content, '--menu-height', height + 'px');
478-
});
476+
if (parseFloat(styles.height) !== height) {
477+
setAttribute(content, 'data-resizing', '');
478+
requestAnimationFrame(() => {
479+
setStyle(content, '--menu-height', height + 'px');
480+
});
481+
}
479482
});
480483

481484
protected _onResizeTransition(event: TransitionEvent) {

0 commit comments

Comments
 (0)