mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
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:
parent
a37303a46c
commit
f291908c7b
@ -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]));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user