Skip to content

Commit

Permalink
fix: made sure image upload works PD-4013
Browse files Browse the repository at this point in the history
  • Loading branch information
lakatosandrei committed Aug 21, 2024
1 parent 4f20679 commit d4e5383
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/components/pie-author/pie-author.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/demo/multiple-choice-validation.html
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<pie-multiple-choice id='1'></pie-multiple-choice>"
Expand Down

0 comments on commit d4e5383

Please sign in to comment.