From feb66270fd615e40f9b8e54c4b3bfb84752bad20 Mon Sep 17 00:00:00 2001 From: Rahim Alwer Date: Tue, 14 Nov 2023 19:47:30 +1100 Subject: [PATCH] fix(player): include text content height in menu height calc --- packages/vidstack/src/components/ui/menu/menu.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/vidstack/src/components/ui/menu/menu.ts b/packages/vidstack/src/components/ui/menu/menu.ts index 351eccc79..656fcb144 100644 --- a/packages/vidstack/src/components/ui/menu/menu.ts +++ b/packages/vidstack/src/components/ui/menu/menu.ts @@ -451,6 +451,8 @@ export class Menu extends Component { for (const child of children) { if (child instanceof HTMLElement && child.style.display === 'contents') { children.push(...child.children); + } else if (child.nodeType === 3) { + height += parseInt(window.getComputedStyle(child).fontSize, 10); } else { height += (child as HTMLElement).offsetHeight || 0; }