Ionic - "camera cancelled" when allowEdit is true
<p>I'm trying to facilitate cropping an image before uploading it in my Ionic app.  It works fine when I pick an image from the image gallery but it fails with the reason <strong>"camera cancelled"</strong> when a photo is directly shot from the camera.</p>

<p>I'm using Cordova's basic camera plugin - cordova-plugin-camera.  Here's the relevant snippet of my code:</p>

<pre><code>$scope.openCamera = function () {
    navigator.camera.getPicture(
        onSuccess(),
        onFailure(),
        {
            allowEdit: true,
            quality: 100,
            sourceType: navigator.camera.PictureSourceType.CAMERA,
            destinationType: navigator.camera.DestinationType.FILE_URI,
            encodingType: Camera.EncodingType.JPEG,
            mediaType: Camera.MediaType.PICTURE,
            targetWidth: 100,
            targetHeight: 100,
            correctOrientation: true
        }
    );
}
</code></pre>

<p>The camera captures photos correctly and also shows the image to let me select area to crop.  However, it fails and enters onFailure() instead of onSuccess().<br>
onFailure() callback prints the error "camera cancelled".  This bug came on 3 of 5 phones of various Android builds I tested it on.</p>

<p>Any help would be much appreciated!</p>