Skip to content

Commit

Permalink
fix(player): include text content height in menu height calc
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Nov 14, 2023
1 parent 234a34e commit feb6627
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vidstack/src/components/ui/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ export class Menu extends Component<MenuProps, {}, MenuEvents> {
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;
}
Expand Down

0 comments on commit feb6627

Please sign in to comment.