+8
-7
lines changedFilter options
+8
-7
lines changed Original file line number Diff line number Diff line change
@@ -169,15 +169,16 @@ export const BFormFile = /*#__PURE__*/ Vue.extend({
169
169
}
170
170
},
171
171
reset() {
172
+
// IE 11 doesn't support setting `$input.value` to `''` or `null`
173
+
// So we use this little extra hack to reset the value, just in case
174
+
// This also appears to work on modern browsers as well
175
+
// Wrapped in try in case IE 11 or mobile Safari crap out
172
176
try {
173
-
// Wrapped in try in case IE 11 craps out
174
-
this.$refs.input.value = ''
177
+
const $input = this.$refs.input
178
+
$input.value = ''
179
+
$input.type = ''
180
+
$input.type = 'file'
175
181
} catch (e) {}
176
-
// IE 11 doesn't support setting `input.value` to '' or null
177
-
// So we use this little extra hack to reset the value, just in case.
178
-
// This also appears to work on modern browsers as well.
179
-
this.$refs.input.type = ''
180
-
this.$refs.input.type = 'file'
181
182
this.selectedFile = this.multiple ? [] : null
182
183
},
183
184
onFileChange(evt) {
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4