From 4f4361616032c7faee807fcde2c3cc511ecb22e8 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Fri, 14 Jul 2017 14:18:23 -0400 Subject: [PATCH] fix(playback rate menu): cycling rates via click (#4486) In 6.0, we changed the way that Menu Buttons were being created by wrapping an actual button with a menu sibling in a container. The playback rate menu also had a rate value display. In 6.x, this rate value display ended up coming on top of the button itself and capturing it's clicks. So, we want to remove pointer-events from the rate-value display and resize the actual button to be the size of the control. --- src/css/components/_playback-rate.scss | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/css/components/_playback-rate.scss b/src/css/components/_playback-rate.scss index e90b733d8e..e13a517d0a 100644 --- a/src/css/components/_playback-rate.scss +++ b/src/css/components/_playback-rate.scss @@ -1,12 +1,17 @@ // TODO: I feel like this should be a generic menu. Research later. +.vjs-playback-rate > .vjs-menu-button, .vjs-playback-rate .vjs-playback-rate-value { - font-size: 1.5em; - line-height: 2; position: absolute; top: 0; left: 0; width: 100%; height: 100%; +} + +.vjs-playback-rate .vjs-playback-rate-value { + pointer-events: none; + font-size: 1.5em; + line-height: 2; text-align: center; }