From e644abed2a55bf365858a92227ade46064b77b1f Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 10 Aug 2023 10:05:32 +0200 Subject: [PATCH] BaseInput.js: Always reset the data input's value upon submit The current terms, if any, are set as json on the input. Though, if there are none, the input was not reset and the previous json was submitted again. --- asset/js/widget/BaseInput.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/asset/js/widget/BaseInput.js b/asset/js/widget/BaseInput.js index cfa2cf9b..30f255d6 100644 --- a/asset/js/widget/BaseInput.js +++ b/asset/js/widget/BaseInput.js @@ -956,9 +956,13 @@ define(["../notjQuery", "Completer"], function ($, Completer) { // This is not part of `onSubmit()` because otherwise it would override what `autoSubmit()` does this.dataInput.value = JSON.stringify({ type: 'submit', terms: this.usedTerms }); + + return; } else if (this.manageRequired && ! this.hasTerms()) { this.input.required = true; } + + this.dataInput.value = ''; } onPaste(event) {