@@ -304,8 +304,6 @@ class FileUploader extends UI5Element implements IFormInputElement {
304304 @property ( { type : Boolean , noAttribute : true } )
305305 _tokenizerOpen = false ;
306306
307- static emptyInput : HTMLInputElement ;
308-
309307 @i18n ( "@ui5/webcomponents" )
310308 static i18nBundle : I18nBundle ;
311309
@@ -488,18 +486,14 @@ class FileUploader extends UI5Element implements IFormInputElement {
488486 this . _clearFileSelection ( ) ;
489487 }
490488
491- _onFormSubmit ( e : SubmitEvent ) {
492- e . preventDefault ( ) ;
493- }
494-
495489 _openFileBrowser ( ) {
496490 this . _input . click ( ) ;
497491 }
498492
499493 _clearFileSelection ( ) {
500494 this . _selectedFilesNames = [ ] ;
501495 this . value = "" ;
502- this . _form ?. reset ( ) ;
496+ this . _input . files = new DataTransfer ( ) . files ;
503497 this . fireDecoratorEvent ( "change" , {
504498 files : this . files ,
505499 } ) ;
@@ -515,7 +509,7 @@ class FileUploader extends UI5Element implements IFormInputElement {
515509 return this . _input . files ;
516510 }
517511
518- return FileUploader . _emptyFilesList ;
512+ return null ;
519513 }
520514
521515 onAfterRendering ( ) {
@@ -621,18 +615,6 @@ class FileUploader extends UI5Element implements IFormInputElement {
621615 }
622616 }
623617
624- /**
625- * in case when the component is not placed in the DOM, return empty FileList, like native input would do
626- * @private
627- */
628- static get _emptyFilesList ( ) {
629- if ( ! this . emptyInput ) {
630- this . emptyInput = document . createElement ( "input" ) ;
631- this . emptyInput . type = "file" ;
632- }
633- return this . emptyInput . files ;
634- }
635-
636618 get accInfo ( ) : InputAccInfo {
637619 return {
638620 "ariaRoledescription" : FileUploader . i18nBundle . getText ( FILEUPLOADER_ROLE_DESCRIPTION ) ,
0 commit comments