Skip to content

Commit

Permalink
fix(UI): Hidden cursor correctly (#7464)
Browse files Browse the repository at this point in the history
Fixes #7394
  • Loading branch information
avelad authored Oct 23, 2024
1 parent 2d33440 commit 3338579
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
}

// Use the cursor specified in the CSS file.
this.videoContainer_.style.cursor = '';
this.videoContainer_.classList.remove('no-cursor');

this.recentMouseMovement_ = true;

Expand Down Expand Up @@ -1516,7 +1516,7 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
*/
onMouseStill_() {
// Hide the cursor.
this.videoContainer_.style.cursor = 'none';
this.videoContainer_.classList.add('no-cursor');
this.recentMouseMovement_ = false;
this.computeOpacity();
}
Expand Down
8 changes: 8 additions & 0 deletions ui/less/containers.less
Original file line number Diff line number Diff line change
Expand Up @@ -426,3 +426,11 @@
/* keep the rewind button to the left */
.absolute-position();
}

.shaka-video-container.no-cursor {
cursor: none !important;

* {
cursor: none !important;
}
}

0 comments on commit 3338579

Please sign in to comment.