Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion camera/src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CameraWeb extends WebPlugin implements CameraPlugin {
document.body.appendChild(actionSheet);
}
actionSheet.header = options.promptLabelHeader || 'Photo';
actionSheet.cancelable = false;
actionSheet.cancelable = true;
actionSheet.options = [
{ title: options.promptLabelPhoto || 'From Photos' },
{ title: options.promptLabelPicture || 'Take Picture' },
Expand All @@ -36,6 +36,9 @@ export class CameraWeb extends WebPlugin implements CameraPlugin {
this.cameraExperience(options, resolve, reject);
}
});
actionSheet.addEventListener('onCanceled', async () => {
reject(new CapacitorException('User cancelled photos app'));
});
} else {
this.cameraExperience(options, resolve, reject);
}
Expand Down