fix: do not trigger modal submission on <select>

This commit is contained in:
Paul Makles 2023-02-22 17:00:47 +01:00
parent de85527cd8
commit 46eec5a132
No known key found for this signature in database
GPG key ID: 5059F398521BB0F6

View file

@ -13,6 +13,7 @@ export default observer(() => {
if (event.key === "Escape") { if (event.key === "Escape") {
modalController.pop("close"); modalController.pop("close");
} else if (event.key === "Enter") { } else if (event.key === "Enter") {
if (event.target instanceof HTMLSelectElement) return;
modalController.pop("confirm"); modalController.pop("confirm");
} }
} }