Skip to content

Commit

Permalink
fix: hide mouse tooltip on touch devices when not scrubbing
Browse files Browse the repository at this point in the history
Problem: the vjs-user-inactive class triggering the hiding of the
tooltip is added much later on touch devices, therefore the mouse
tooltip stays visible on its last seek target position whenever the user
taps the screen to access the controls.

This change ensures that the mouse tooltip is only visible when the user
is actually scrubbing.
  • Loading branch information
phloxic committed Dec 22, 2024
1 parent 19ca3f2 commit 79a0fc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/css/components/_progress.scss
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@
display: block;
}

.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display {
.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display,
.video-js.vjs-touch-enabled:not(.vjs-scrubbing) .vjs-progress-control .vjs-mouse-display {
visibility: hidden;
opacity: 0;
$trans: visibility 1.0s, opacity 1.0s;
Expand Down

0 comments on commit 79a0fc9

Please sign in to comment.