From 6f80ad3fb73644de55a6ca74f79ddf1b1d0fea7d Mon Sep 17 00:00:00 2001 From: SverreNystad Date: Tue, 17 Sep 2024 02:09:44 +0200 Subject: [PATCH] fix: Prevent default spacebar scrolling in agentplayer.js --- frontend/agentplayer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/agentplayer.js b/frontend/agentplayer.js index 0ddfae1..4304cca 100644 --- a/frontend/agentplayer.js +++ b/frontend/agentplayer.js @@ -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);