Skip to content

Commit e5143d2

Browse files
committed
Keep Firefox window from scrolling right when using the right arrow key in presentations.
1 parent 4a2cdbe commit e5143d2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

static/js/directives/presentation.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,16 @@ define(['jquery', 'underscore', 'text!partials/presentation.html', 'bigscreen'],
743743
event.preventDefault();
744744
});
745745

746+
$(document).on("keydown", function(event) {
747+
if (!$scope.layout.presentation) {
748+
return;
749+
}
750+
if ($(event.target).is("input,textarea,select")) {
751+
return;
752+
}
753+
event.preventDefault();
754+
});
755+
746756
$scope.$watch("layout.presentation", function(newval, oldval) {
747757
if (newval && !oldval) {
748758
$scope.showPresentation();

0 commit comments

Comments
 (0)