Skip to content

Commit

Permalink
Merge pull request #172 from pie-framework/fix/PD-4013
Browse files Browse the repository at this point in the history
fix: made sure image upload works PD-4013
  • Loading branch information
andreeapescar authored Aug 23, 2024
2 parents 4f20679 + d4e5383 commit 8e959f3
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 8e959f3

Please sign in to comment.