Skip to content

Commit

Permalink
fix: Prevent default spacebar scrolling in agentplayer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SverreNystad committed Sep 17, 2024
1 parent f148654 commit 6f80ad3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/agentplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ function startDemo() {
};
}

window.addEventListener("keydown", (e) => {
if (e.key === " ") {
e.preventDefault(); // Prevent default spacebar scrolling
}
});
// Load the agents when the page is loaded
window.addEventListener("load", loadAgents);

Expand Down

0 comments on commit 6f80ad3

Please sign in to comment.