8000 webrepl.html: Deselect previously selected file before reading · micropython/webrepl@8ea1afd · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ea1afd

Browse files
committed
webrepl.html: Deselect previously selected file before reading
Without this, if you select a file, make modifications and select the same file again, it does not read the latest changes as the file inputs change event does not fire. To work around, you have to select a different file, or cancel the file dialog to clear the field value before trying your modified file again.
1 parent 6cadea3 commit 8ea1afd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

webrepl.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@
335335
reader.readAsArrayBuffer(f);
336336
}
337337

338+
document.getElementById('put-file-select').addEventListener('click', function(){
339+
this.value = null;
340+
}, false);
341+
338342
document.getElementById('put-file-select').addEventListener('change', handle_put_file_select, false);
339343
document.getElementById('put-file-button').disabled = true;
340344

0 commit comments

Comments
 (0)
0