change value of input element only when opening the edit

updates do not need to update them
(not yet done for enum and checkbox)
This commit is contained in:
2025-05-02 10:11:02 +02:00
parent 7898e375b4
commit 0f16699323
2 changed files with 6 additions and 10 deletions

View File

@ -242,6 +242,10 @@ function createIconEdit (input_element) {
hideInputElements();
if (is_hidden) {
input_element.classList.remove('input-element-hidden');
if (input_element.inputChild) {
// update input value before edit
input_element.inputChild.value = input_element.inputChild.actualValue;
}
icon_edit.setAttribute('src', 'res/icon_edit_close.png');
} else {
icon_edit.setAttribute('src', 'res/icon_edit.png');
@ -327,6 +331,7 @@ function createInputText(component) {
};
form.appendChild(input);
form.appendChild(createSubmitButton());
form.inputChild = input;
return form;
}