Skip to content

Commit

Permalink
Keep Firefox window from scrolling right when using the right arrow k…
Browse files Browse the repository at this point in the history
…ey in presentations.
  • Loading branch information
theurere committed Dec 19, 2014
1 parent a6b54d7 commit 6bae36a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions static/js/directives/presentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,16 @@ define(['jquery', 'underscore', 'text!partials/presentation.html', 'bigscreen'],
});
});

$(document).on("keydown", function(event) {
if (!$scope.layout.presentation) {
return;
}
if ($(event.target).is("input,textarea,select")) {
return;
}
event.preventDefault();
});

$scope.$watch("layout.presentation", function(newval, oldval) {
if (newval && !oldval) {
$scope.showPresentation();
Expand Down

0 comments on commit 6bae36a

Please sign in to comment.