fix(commandline): running wrong command on mobile or when not moving the mouse

closes #6037
This commit is contained in:
Miodec 2024-11-14 19:56:35 +01:00
parent 527d65702a
commit e21a205c0a

View file

@ -430,7 +430,11 @@ async function showCommands(): Promise<void> {
await updateActiveCommand();
});
command.addEventListener("click", async () => {
const previous = activeIndex;
activeIndex = parseInt(command.getAttribute("data-index") ?? "0");
if (previous !== activeIndex) {
await updateActiveCommand();
}
await runActiveCommand();
});
}