Skip to content

Commit 017ed6a

Browse files
fix: Listen to cancel event on PWA camera photo prompt
Requires ionic-team/pwa-elements#138
1 parent e02f6d8 commit 017ed6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

camera/src/web.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ export class CameraWeb extends WebPlugin implements CameraPlugin {
3636
this.cameraExperience(options, resolve, reject);
3737
}
3838
});
39+
actionSheet.addEventListener('onCanceled', async () => {
40+
reject(new CapacitorException('User cancelled photos app'));
41+
});
3942
} else {
4043
this.cameraExperience(options, resolve, reject);
4144
}

0 commit comments

Comments
 (0)