From 1d9eb63d61a6389c9937a30e543d5bae07158b9d Mon Sep 17 00:00:00 2001 From: mic Date: Mon, 16 Jun 2025 21:16:40 +0200 Subject: [PATCH] better handling of checkfields when typing --- pages/customdataplaceholders/mzta-custom-dataplaceholders.js | 2 +- pages/customprompts/mzta-custom-prompts.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/customdataplaceholders/mzta-custom-dataplaceholders.js b/pages/customdataplaceholders/mzta-custom-dataplaceholders.js index 713a211c..cfdbf9f4 100644 --- a/pages/customdataplaceholders/mzta-custom-dataplaceholders.js +++ b/pages/customdataplaceholders/mzta-custom-dataplaceholders.js @@ -72,7 +72,7 @@ document.addEventListener('DOMContentLoaded', async () => { let btnNew_elements = document.querySelectorAll(".input_new"); if(btnNew_elements) { btnNew_elements.forEach(element => { - element.addEventListener('change', (e) => { + element.addEventListener('input', (e) => { e.preventDefault(); checkFields(); }); diff --git a/pages/customprompts/mzta-custom-prompts.js b/pages/customprompts/mzta-custom-prompts.js index d94646e6..85d0ae34 100644 --- a/pages/customprompts/mzta-custom-prompts.js +++ b/pages/customprompts/mzta-custom-prompts.js @@ -78,7 +78,7 @@ document.addEventListener('DOMContentLoaded', async () => { let btnNew_elements = document.querySelectorAll(".input_new"); if(btnNew_elements) { btnNew_elements.forEach(element => { - element.addEventListener('change', (e) => { + element.addEventListener('input', (e) => { e.preventDefault(); checkFields(); });