From 72bd7d15a11364794c20f70b5724856bf563ab1f Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Wed, 28 May 2025 14:32:26 -0300 Subject: [PATCH] Fix pro issue 5819 / focus first input in option container with error --- js/formidable.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/formidable.js b/js/formidable.js index e9b9e2c965..3a650b6d33 100644 --- a/js/formidable.js +++ b/js/formidable.js @@ -1379,6 +1379,12 @@ function frmFrontFormJS() { timeoutCallback = function() { tinyMCE.activeEditor.focus(); }; + } else if ( element.classList.contains( 'frm_opt_container' ) ) { + const firstInput = element.querySelector( 'input' ); + if ( firstInput ) { + focusInput( firstInput ); + break; + } } if ( 'function' === typeof timeoutCallback ) {