I am using an hidden file input that I am triggering using Vue
<input
ref="uploader"
class="d-none"
type="file"
@change="onFileChanged"
@cancel="closeWizard"
>
this section of code is triggered by this method:
window.addEventListener('focus', () => {
this.isSelecting = false;
}, { once: true });
// Trigger click on the FileInput
this.$refs.uploader.click();
It works almost perfect, I can access the file in the onFileChanged method. However, I would like to catch a cancel event so that I can close the wizard in which the file dialog resides. Unfortunately,
@cancel="closeWizard"
does not work, any ideas how to catch the cancel?