CloneNode does not clone file upload item value in Google Chrome

I am using cloneNode in Firefox and it works fine. But in Chrome, this does not work as I expected. The cloneNode method cloneNode the node, but it does not clone the node value if node is a file ( <input type="file"> ).

Does anyone know how to fix this problem?

+4
source share
1 answer

Just clarify: are you element.cloneNode(true) or element.cloneNode(false) ?

Assuming you are using true , I would recommend giving an error to http://crbug.com

For security reasons, I doubt very much that you can change the value property, so it's best to remake your program so that you no longer need to clone it until the Chrome team decides to fix it.

0
source

All Articles