Bug fix with the arrows key

This commit is contained in:
yannfrendo
2023-11-22 12:40:34 +01:00
parent 0ed15659fe
commit 9ed0f78299
@@ -48,8 +48,13 @@
dispatch('confirm', value);
}
};
const handleKeydown = (event: KeyboardEvent) => {
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {
event.stopPropagation();
}
};
</script>
<div role="presentation" on:keydown={handleKeydown}>
<ConfirmDialogue
confirmColor="primary"
cancelColor="secondary"
@@ -81,3 +86,4 @@
</div>
</div>
</ConfirmDialogue>
</div>