Skip to content

Commit

Permalink
disable shortcuts if inspector closed
Browse files Browse the repository at this point in the history
  • Loading branch information
ngokevin committed Feb 17, 2019
1 parent 107a00a commit b071eab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var Shortcuts = {
modules: {}
},
onKeyUp: function(event) {
if (!shouldCaptureKeyEvent(event)) {
if (!shouldCaptureKeyEvent(event) || !AFRAME.INSPECTOR.opened) {
return;
}

Expand Down Expand Up @@ -124,7 +124,7 @@ var Shortcuts = {
}
},
onKeyDown: function(event) {
if (!shouldCaptureKeyEvent(event)) {
if (!shouldCaptureKeyEvent(event) || !AFRAME.INSPECTOR.opened) {
return;
}

Expand Down

0 comments on commit b071eab

Please sign in to comment.