File tree Expand file tree Collapse file tree
birdnet_analyzer/gui/assets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,18 +54,17 @@ function init() {
5454 }
5555
5656 function bindReviewKeyShortcuts ( ) {
57- const posBtn = document . getElementById ( "positive-button" ) ;
58- const negBtn = document . getElementById ( "negative-button" ) ;
59- const skipBtn = document . getElementById ( "skip-button" ) ;
60- const undoBtn = document . getElementById ( "undo-button" ) ;
61-
62- if ( ! posBtn || ! negBtn ) return ;
63-
6457 console . log ( "Binding review key shortcuts..." ) ;
6558
6659 document . addEventListener ( "keydown" , function ( event ) {
60+ const posBtn = document . getElementById ( "positive-button" ) ;
61+ const negBtn = document . getElementById ( "negative-button" ) ;
62+ const skipBtn = document . getElementById ( "skip-button" ) ;
63+ const undoBtn = document . getElementById ( "undo-button" ) ;
6764 const reviewTabBtn = document . getElementById ( "review-tab-button" ) ;
6865
66+ if ( ! posBtn || ! negBtn ) return ;
67+
6968 if ( reviewTabBtn . ariaSelected === "false" ) return ;
7069
7170 if ( event . key === "ArrowUp" ) {
You can’t perform that action at this time.
0 commit comments