UI - Javascript (setFormData) - prevent "Uncaught DOMException: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string" when a form contains file inputs

This commit is contained in:
Ad Schellevis 2022-11-21 20:40:30 +01:00
parent a37303a46c
commit f291908c7b

View File

@ -179,7 +179,7 @@ function setFormData(parent,data) {
} else if (targetNode.hasClass('json-data')) {
// if the input field is JSON data, serialize the data into the field
targetNode.data('data', node[keypart]);
} else {
} else if (targetNode.attr('type') !== 'file') {
// regular input type
targetNode.val(htmlDecode(node[keypart]));
}