disable right arrow when searching

This commit is contained in:
Georgi Gardev
2023-11-20 12:16:40 +02:00
parent 0c7a8aee45
commit 1fa2a6c483

View File

@@ -45,7 +45,9 @@ export default function Home() {
function handleKeypress(e: KeyboardEvent) {
switch (e.key) {
case 'ArrowRight': {
onNextBackground();
if (document.activeElement?.id === 'search') {
onNextBackground();
}
break;
}
case 'Escape': {