Skip to content

Commit

Permalink
Fix input field to allow re-choosing the same file by clearing after …
Browse files Browse the repository at this point in the history
…selection (#4046)
  • Loading branch information
urabhay10 authored Nov 10, 2024
1 parent 0dff3ea commit 88fd12d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -2097,10 +2097,12 @@ class Block {
if (that.name === "media") {
that.value = reader.result;
that.loadThumbnail(null);
fileChooser.value = '';
return;
}
that.value = [fileChooser.files[0].name, reader.result];
that.blocks.updateBlockText(thisBlock);
fileChooser.value = '';
}
};
if (that.name === "media") {
Expand Down

0 comments on commit 88fd12d

Please sign in to comment.