From 08e38716c4d2bb1f31207c004540a8109e620cec Mon Sep 17 00:00:00 2001 From: j3nsch Date: Mon, 21 Oct 2024 11:00:27 +0200 Subject: [PATCH] #1243 Prevent ENTER in text input elements to trigger submit --- public/layouts/opus4/js/submit.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/layouts/opus4/js/submit.js b/public/layouts/opus4/js/submit.js index a95bc5d00..e164f933b 100644 --- a/public/layouts/opus4/js/submit.js +++ b/public/layouts/opus4/js/submit.js @@ -37,11 +37,11 @@ $(function () { }); $('form').on('keydown', e => { - if (e.key === 'Enter') { - if ($(e.target).is("input[type='text']")) { - e.preventDefault(); - } - } + if (e.key === 'Enter') { + if ($(e.target).is("input[type='text']")) { + e.preventDefault(); + } + } }); }); \ No newline at end of file