Skip to content

fix(menu): add max-height and overflow-y to allow scrolling with many items#2894

Open
terminalchai wants to merge 2 commits into
sampotts:masterfrom
terminalchai:fix/menu-scroll-overflow
Open

fix(menu): add max-height and overflow-y to allow scrolling with many items#2894
terminalchai wants to merge 2 commits into
sampotts:masterfrom
terminalchai:fix/menu-scroll-overflow

Conversation

@terminalchai
Copy link
Copy Markdown

Problem

When a player has many quality options or caption tracks (e.g. 30 languages), the settings menu panel grows beyond the viewport height with no way to scroll. Items below the fold are completely inaccessible.

Fixes #1420.

Fix

Add a $plyr-menu-max-height SCSS variable backed by the --plyr-menu-max-height CSS custom property (defaulting to 240px) and apply it to the [role='menu'] container with overflow-y: auto:

// src/sass/settings/menus.scss
$plyr-menu-max-height: var(--plyr-menu-max-height, 240px) !default;

// src/sass/components/menus.scss
[role='menu'] {
  max-height: $plyr-menu-max-height;
  overflow-y: auto;
  padding: $plyr-control-padding;
}

This caps the panel at 240px and enables scrolling when the list overflows. The default can be overridden per-instance via the --plyr-menu-max-height CSS custom property, consistent with how all other Plyr style tokens work. No ARIA roles or JS logic are touched.

sampotts and others added 2 commits January 3, 2026 16:01
* fix(pkg): fix import path for ESM (fixes sampotts#2882)

* fix(vimeo): hide default vimeo captions (fixes sampotts#877)
… items

When a player has many quality options or caption tracks (e.g. 30
languages), the settings menu panel grows beyond the viewport with no
way to scroll, clipping the excess items.

Add a \\-menu-max-height\ SCSS variable (backed by the
\--plyr-menu-max-height\ CSS custom property, defaulting to 240px)
and apply it to the \[role='menu']\ container along with
\overflow-y: auto\.

This caps the panel height at 240px and lets it scroll, without
touching any ARIA roles or JS logic.

Fixes sampotts#1420
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu does not scroll when it contains many items

2 participants