diff --git a/src/components/pie-author/pie-author.tsx b/src/components/pie-author/pie-author.tsx index ffd7747..ea3b221 100644 --- a/src/components/pie-author/pie-author.tsx +++ b/src/components/pie-author/pie-author.tsx @@ -272,11 +272,14 @@ export class Author { this.dialogOpened = false; - if (this.fileInput.files.length === 0) { - // it means the user clicked cancel - this.imageHandler.cancel(); - this.imageHandler = null; - } + // needed in order for the fileInput to be populated with the file + setTimeout(() => { + if (this.fileInput.files.length === 0) { + // it means the user clicked cancel + this.imageHandler.cancel(); + this.imageHandler = null; + } + }, 50); }; this.handleInsertImage = (e: InsertImageEvent) => { diff --git a/src/demo/multiple-choice-validation.html b/src/demo/multiple-choice-validation.html index 697463a..6f96c80 100644 --- a/src/demo/multiple-choice-validation.html +++ b/src/demo/multiple-choice-validation.html @@ -29,7 +29,7 @@ const config = { id: '1', elements: { - 'pie-multiple-choice': '@pie-element/multiple-choice@5.9.3-next.760' + 'pie-multiple-choice': '@pie-element/multiple-choice@8.23.2' }, models: [MC_model], markup: ""