[TIMOB-5900] iOS5: Closing camera or gallery closes modal
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-11-22T11:17:56.000+0000 |
Affected Version/s | Release 1.7.3 |
Fix Version/s | Release 1.8.0, Release 1.7.6, Release 1.8.0.1 |
Components | iOS |
Labels | module_media, qe-testadded |
Reporter | Alan Leard |
Assignee | Blain Hamon |
Created | 2011-10-28T12:50:08.000+0000 |
Updated | 2014-06-19T12:43:19.000+0000 |
Description
If you open the camera or a photo gallery from a modal window, when you close this window, titanium also closes the modal window. This does not happen on iOS4.
To reproduce, load app on device, click 'Launch Modal", then click "Camera", take a picture and click "Use". Image should appear on the screen under the "Camera" button on the "Modal" window. This works on iOS 4 devices.
var win1 = Ti.UI.createWindow(
{
title: "window 1"
});
var button1 = Titanium.UI.createButton(
{
color: '#999',
title: 'Launch Modal',
width: '200dp',
height: '60dp'
});
win1.add(button1);
button1.addEventListener("click", function()
{
modal = Ti.UI.createWindow(
{
modal: true,
title: "modal"
});
var cameraButton = Ti.UI.createButton(
{
title: "camera",
top: "50dp",
width: "150dp",
height: "60dp"
});
modal.add(cameraButton);
imageViewResize = Ti.UI.createImageView(
{
top: "200dp",
height: "200dp",
width: "200dp"
});
modal.add(imageViewResize);
cameraButton.addEventListener("click", function()
{
Titanium.Media.showCamera(
{
success: function(event)
{
imageViewResize.image = event.media;
},
error: function()
{
},
cancel: function()
{
},
saveToPhotoGallery: true,
allowEditing: true,
mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],
showControls: true
});
});
modal.open();
});
win1.open();
Pull request #657 pending.
Come 'n get it. http://builds.appcelerator.com.s3.amazonaws.com/index.html Reresolving as it's in place now.
Pass: Tested with 1.8.0.1.v20111116185058 on iPad 2 4.3.5 iPod Touch 4.02 iPhone 4s 5.0