UX: textfields now submit on Ctrl+Enter instead of Enter

This commit is contained in:
Pieter Vander Vennet 2024-09-02 15:00:19 +02:00
parent fb46381d10
commit 4fdd586a3c

View file

@ -55,7 +55,7 @@
} }
function onKeyPress(e: KeyboardEvent) { function onKeyPress(e: KeyboardEvent) {
if (e.key === "Enter") { if (e.key === "Enter" && (!validator.textArea || e.ctrlKey)) {
e.stopPropagation() e.stopPropagation()
e.preventDefault() e.preventDefault()
dispatch("submit") dispatch("submit")