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 May 4, 2015
1 parent 4a2cdbe commit e5143d2
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 @@ -743,6 +743,16 @@ define(['jquery', 'underscore', 'text!partials/presentation.html', 'bigscreen'],
event.preventDefault();
});

$(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 e5143d2

Please sign in to comment.