fix(menu): add max-height and overflow-y to allow scrolling with many items#2894
Open
terminalchai wants to merge 2 commits into
Open
fix(menu): add max-height and overflow-y to allow scrolling with many items#2894terminalchai wants to merge 2 commits into
terminalchai wants to merge 2 commits into
Conversation
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-heightSCSS variable backed by the--plyr-menu-max-heightCSS custom property (defaulting to240px) and apply it to the[role='menu']container withoverflow-y: auto: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-heightCSS custom property, consistent with how all other Plyr style tokens work. No ARIA roles or JS logic are touched.