{ "id": "91295", "key": "TIMOB-8979", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" }, { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13406", "description": "Sprint 2012-10 API", "name": "Sprint 2012-10 API", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-10T10:59:48.000+0000", "created": "2012-05-03T15:23:41.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_media", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-11T13:27:20.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h3. Code\r\n\r\n{noformat}\r\n\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor:'white'\r\n});\r\nwin.open();\r\n\r\nvar imageView = Titanium.UI.createImageView({\r\n height:200,\r\n width:200,\r\n top:20,\r\n left:10,\r\n backgroundColor:'#999'\r\n});\r\n\r\nwin.add(imageView);\r\n\r\nvar popoverView;\r\nvar arrowDirection;\r\n\r\nif (Titanium.Platform.osname == 'ipad')\r\n{\r\n // photogallery displays in a popover on the ipad and we\r\n // want to make it relative to our image with a left arrow\r\n arrowDirection = Ti.UI.iPad.POPOVER_ARROW_DIRECTION_LEFT;\r\n popoverView = imageView;\r\n}\r\n\r\nTitanium.Media.openPhotoGallery({\r\n\r\n success:function(event)\r\n {\r\n var cropRect = event.cropRect;\r\n var image = event.media;\r\n\r\n // set image view\r\n Ti.API.debug('Our type was: '+event.mediaType);\r\n if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO)\r\n {\r\n imageView.image = image;\r\n }\r\n else\r\n {\r\n // is this necessary?\r\n }\r\n\r\n Titanium.API.info('PHOTO GALLERY SUCCESS cropRect.x ' + cropRect.x + ' cropRect.y ' + cropRect.y + ' cropRect.height ' + cropRect.height + ' cropRect.width ' + cropRect.width);\r\n\r\n },\r\n cancel:function()\r\n {\r\n alert('cancelled fired');\r\n },\r\n error:function(error)\r\n {\r\n },\r\n allowEditing:true,\r\n popoverView:popoverView,\r\n arrowDirection:arrowDirection,\r\n mediaTypes:[Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO]\r\n});\r\n\r\n{noformat}\r\n\r\nh3. Expected Behavior\r\n\r\nThe alert in cancel event should get fired. \r\n\r\nh3. Actual Behavior\r\n\r\nThis does not work on the iPad simulator but works fine on iPhone simulator\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Ti.Media.openPhotoGallery's cancel event doesn't trigger on iPad", "creator": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "environment": "Platform OS: iOS version 5.0\r\nTi SDK: 2.0.1 GA2", "comment": { "comments": [ { "id": "194132", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[Pull pending|https://github.com/appcelerator/titanium_mobile/pull/2149]", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-08T11:10:47.000+0000", "updated": "2012-05-08T11:10:47.000+0000" }, { "id": "194923", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 2.0.2.v20120515140151 on iPad 3 5.1.1", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-15T16:24:15.000+0000", "updated": "2012-05-15T16:24:15.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }