Skip to content

Commit 88fd12d

Browse files
authored
Fix input field to allow re-choosing the same file by clearing after selection (#4046)
1 parent 0dff3ea commit 88fd12d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/block.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,10 +2097,12 @@ class Block {
20972097
if (that.name === "media") {
20982098
that.value = reader.result;
20992099
that.loadThumbnail(null);
2100+
fileChooser.value = '';
21002101
return;
21012102
}
21022103
that.value = [fileChooser.files[0].name, reader.result];
21032104
that.blocks.updateBlockText(thisBlock);
2105+
fileChooser.value = '';
21042106
}
21052107
};
21062108
if (that.name === "media") {

0 commit comments

Comments
 (0)