File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,15 +169,16 @@ export const BFormFile = /*#__PURE__*/ Vue.extend({
169169 }
170170 } ,
171171 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
172176 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'
175181 } 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'
181182 this . selectedFile = this . multiple ? [ ] : null
182183 } ,
183184 onFileChange ( evt ) {
You can’t perform that action at this time.
0 commit comments