Skip to content

Commit 61b0205

Browse files
authored
fix(ui5-file-uploader): Fix JS error thrown in IE (#2023)
In IE, the native "input" element is not inside the ShadowDOM, but in the Light one, so the following statement fails to get it - this.getDomRef().querySelector(`input[type="file"]`). Instead, we should use the safe "_input" getter that looks in the Light DOM. FIXES: #2018
1 parent 8123288 commit 61b0205

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/main/src/FileUploader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ class FileUploader extends UI5Element {
250250

251251
onAfterRendering() {
252252
if (!this.value) {
253-
this.getDomRef().querySelector(`input[type="file"]`).value = "";
253+
this._input.value = "";
254254
}
255255
}
256256

0 commit comments

Comments
 (0)