File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
packages/ui-file-drop/src/FileDrop Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -232,10 +232,8 @@ class FileDrop extends Component<FileDropProps, FileDropState> {
232232 e . preventDefault ( )
233233 this . enterCounter = 0
234234 // When dropping a file the browser does not populate the input's
235- // 'files' property, so we need to do it manually.
236- // Browsers do not allow setting the 'value' of file inputs for security,
237- // so it will be empty here.
238- this . fileInputEl ! . value = ''
235+ // 'files' property, so we need to do it manually. This will also populate
236+ // the input's 'value' prop, which contains the first file's path
239237 this . fileInputEl ! . files = new DataTransfer ( ) . files
240238 if ( accepted . length > 0 && 'dataTransfer' in e ) {
241239 this . fileInputEl ! . files = e . dataTransfer ! . files
You can’t perform that action at this time.
0 commit comments