Skip to content

Commit

Permalink
Disable arrowkey event listener if an input is focused (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley authored Aug 4, 2022
1 parent 672fe02 commit f6cffa4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions web_client/src/components/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default {
if (!this.navigateToNextIfCurrentScanNull()) {
this.switchLock(this.experimentId);
window.addEventListener('keydown', (event) => {
if (['textarea', 'input'].includes(document.activeElement.type)) return;
if (event.key === 'ArrowUp') {
this.handleKeyPress('previous');
} else if (event.key === 'ArrowDown') {
Expand Down

0 comments on commit f6cffa4

Please sign in to comment.