Skip to content

Commit

Permalink
fix(playback rate menu): cycling rates via click (videojs#4486)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gkatsev authored Jul 14, 2017
1 parent 687aae5 commit 4f43616
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/css/components/_playback-rate.scss
Original file line number Diff line number Diff line change
@@ -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;
}

Expand Down

0 comments on commit 4f43616

Please sign in to comment.