Skip to content

Commit

Permalink
Don't enter fullscreen on double click on bottom bar.
Browse files Browse the repository at this point in the history
Fixes #2053

Change-Id: I4779547ae2116d9cc4394c27aab33366ad36a6a6
  • Loading branch information
TheModMaker committed Jul 29, 2019
1 parent 3b0367e commit 39f0d76
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ui/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,13 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
// for focused elements.
this.eventManager_.listen(window, 'keydown', (e) => this.onKeyDown_(e));

this.eventManager_.listen(this.controlsContainer_, 'dblclick',
() => this.toggleFullScreen());
this.eventManager_.listen(
this.controlsContainer_, 'dblclick', () => this.toggleFullScreen());

// If double-clicking on the bottom bar, don't allow the click to propagate
// to toggle fullscreen above.
this.eventManager_.listen(
this.bottomControls_, 'dblclick', (e) => e.stopPropagation());

this.eventManager_.listen(this.video_, 'play', () => {
this.onPlayStateChange_();
Expand Down

0 comments on commit 39f0d76

Please sign in to comment.