fix space handler when in input

AuthorKonata <konata@posteo.jp>
Date
Commit9ab7fa92b43a63302a386502643c7c6c19e3dae7
Parent1182894
1 file changed, 4 insertions(+)
▾Mwebclient/src/App.tsx
@@ -314,6 +314,10 @@ const App: Component = () => {
});
document.addEventListener("keydown", (e) => {
const activeElementTag = document.activeElement?.tagName.toLowerCase();
if (activeElementTag === "input") {
return;
}
if (e.key === " ") {
togglePlay();
e.preventDefault();