Skip to content

Commit ee559da

Browse files
authored
Fixed key shortcuts in review tab (#797)
1 parent 4ed6704 commit ee559da

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

  • birdnet_analyzer/gui/assets

birdnet_analyzer/gui/assets/gui.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff 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") {

0 commit comments

Comments
 (0)