From 4dd30f58e24253edcfd05a8dfd9eec42b75c111a Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Sat, 23 Aug 2025 18:40:36 +0300 Subject: [PATCH] Use submitThisForm() only if there is no 'data-on-change' == 'submitThisForm' attribute (skin.js) - We need to find the 'data-on-change' attribute either on the current "target" object or, when using "chosen", on the source object from which the "chosen" element was created. If there is no attribute (for example for text fields), then we execute submitThisForm() --- web/skins/classic/js/skin.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/js/skin.js b/web/skins/classic/js/skin.js index 35f4ed081..90f0122f1 100644 --- a/web/skins/classic/js/skin.js +++ b/web/skins/classic/js/skin.js @@ -1792,7 +1792,15 @@ function handleKeydownGeneral(evt) { // Controls pressing "Enter" inside the sliding panel from Sidebar. Used to submit the form to the Console page. if (navbar_type == 'left' && key == 'Enter') { if (SIDEBAR_MAIN_EXTRUDER.contains(target)) { - //submitThisForm(); + if (target.getAttribute('data-on-change')) { + return; + } else { + const chosenContainer = target.closest('.chosen-container'); + if (chosenContainer && chosenContainer.previousElementSibling.getAttribute('data-on-change') == 'submitThisForm') { + return; + } + } + submitThisForm(); } } }