Skip to content

Commit

Permalink
fix: improves control bar hiding functionality (#6400)
Browse files Browse the repository at this point in the history
Fixes #6391
  • Loading branch information
gjanblaszczyk authored and gkatsev committed Jan 15, 2020
1 parent 7008777 commit 6f77778
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -3860,7 +3860,7 @@ class Player extends Component {
mouseInProgress = this.setInterval(handleActivity, 250);
};

const handleMouseUp = function(event) {
const handleMouseUpAndMouseLeave = function(event) {
handleActivity();
// Stop the interval that maintains activity if the mouse/touch is down
this.clearInterval(mouseInProgress);
Expand All @@ -3869,7 +3869,8 @@ class Player extends Component {
// Any mouse movement will be considered user activity
this.on('mousedown', handleMouseDown);
this.on('mousemove', handleMouseMove);
this.on('mouseup', handleMouseUp);
this.on('mouseup', handleMouseUpAndMouseLeave);
this.on('mouseleave', handleMouseUpAndMouseLeave);

const controlBar = this.getChild('controlBar');

Expand Down

0 comments on commit 6f77778

Please sign in to comment.