Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
fix (player): default keyboard events are not prevented
Browse files Browse the repository at this point in the history
Before the keyboard event listener was all too greedy and prevented any
default keyboard event from being passed to the browser.
Reloading the page, for example, is now possible even if the player has
focus.
  • Loading branch information
line-o committed Dec 3, 2015
1 parent 8833837 commit 559e768
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,8 @@ function addBehavior(player, params, wrapper) {
startedPaused = media.paused;
}
*/
e.preventDefault();
e.stopPropagation();

// e.preventDefault();
// e.stopPropagation();
var keyCode = e.which,
duration = timeline.player.duration,
seekTime = timeline.player.currentTime;
Expand Down Expand Up @@ -340,7 +339,7 @@ function addBehavior(player, params, wrapper) {
timeline.player.pause();
return false;
default:
return false;
return true;
}

timeline.setTime(seekTime);
Expand Down

0 comments on commit 559e768

Please sign in to comment.