Fix context menu adding video scroll bar #6075
Merged
+2
−1
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.
Fix video player displaying a vertical scrollbar when context menu outside player container
Pull Request Type
Related issue
Closes #6006
Description
Hey, I've been interested in extra features but before taming the beast, I figured I'd just try something easy first.
So turns out with the recent update to the video player to use the shaka player, when the context menu is brought too close to the bottom, it adds a scroll bar to the video container.
This PR just aims to make both horizontal and vertical
overflow
css properties of the video player component tohidden
rather than just the horizontal part.Screenshots
Testing
This was tested, and indeed closes #6006.
Desktop
Additional context
So, I initially wanted to re-position the context menu slightly higher or to the left if it were to be respectively too close to the bottom or to the right ends. I naively thought I could replace the "contextmenu" event listener but spending hours on this just pointed me to ugly hacks at best so I didn't carry on.
For reference, the context menu div position callback is defined in the
Shaka.ui.ContextMenu
constructorShaka player docs: https://shaka-player-demo.appspot.com/docs/api/ui_context_menu.js.html#line48
Shaka player code: https://github.com/shaka-project/shaka-player/blob/main/ui/context_menu.js#L48
I'm not gonna try fixing that upstream, but if anyone has any idea, I'm all hears.
Alternatively, we could
overflow
css property tovisible
so the context menu will always be visible, and no scrollbar, but requires additional testing going in and out fullscreen;