Skip to content

Commit

Permalink
Merge pull request #242 from lookit/feature/227-exit-with-escape
Browse files Browse the repository at this point in the history
bring up exit dialogue upon pressing Esc rather than just F1/ctrl-X.
  • Loading branch information
Kim Scott committed Apr 9, 2021
2 parents a0f814b + 2f4c955 commit c33a489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/exp-player/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default Ember.Component.extend(FullScreen, {
$(window).on('beforeunload', this.beforeUnload.bind(this));
var _this = this;
Ember.$(window).on('keydown', (e) => {
if ((e.which === 112) || (e.ctrlKey && e.which == 88)) { // F1 key or ctrl-x
if ((e.which === 112) || (e.which === 27) || (e.ctrlKey && e.which == 88)) { // F1 key, Esc, or ctrl-x
_this.exitFullscreen();
_this.showConfirmationDialog();
}
Expand Down

0 comments on commit c33a489

Please sign in to comment.