{ "id": "84301", "key": "TIMOB-6903", "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": "13503", "description": "Sprint 2012-14 Core", "name": "Sprint 2012-14 API", "archived": true, "released": true, "releaseDate": "2012-07-13" }, { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-16T12:11:52.000+0000", "created": "2011-12-27T17:06:17.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "api", "module_popover", "qe-testadded" ], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-10T10:02:57.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": "h2. Problem\r\n\r\nWhen popoverView is set to control the position of the Photo Gallery popover, the popover opens too far to the right and down to a point where it eventually opens off-screen, out of view, depending on the position of the view.\r\n\r\nh2. Test case\r\n\r\nh3. Test 1\r\n\r\nThe following code adds three sets of three buttons to a window. Each button click should trigger the display of the Photo Gallery in a popover, with the popover pointing to the clicked button. The button label indicates the value that is set for arrowDirection.\r\n\r\nNotice that the lower right \"Left Arrow\" button causes the Photo Gallery popover to open off screen. And the rest appear in unexpected positions and/or pointed to unexpected coordinates.\r\n\r\n{code:lang=javascript}\r\nfunction showGallery(targetView, arrowDirection) {\r\n Titanium.Media.openPhotoGallery({\r\n success:function(event) {\t\r\n Titanium.API.info('photo gallery success');\r\n },\r\n cancel:function() {\r\n Titanium.API.info('photo gallery cancel');\r\n },\r\n error:function(error) {\r\n Titanium.API.info('photo gallery error');\r\n },\r\n allowEditing: true,\r\n popoverView: targetView,\r\n arrowDirection: arrowDirection,\r\n mediaTypes:[Ti.Media.MEDIA_TYPE_PHOTO]\r\n });\r\n\r\n};\r\n\r\nvar win = Ti.UI.createWindow({\r\n title:'Test Case',\r\n backgroundColor:'#ffffff'\r\n});\r\n\r\nvar b1 = Ti.UI.createButton({\r\n top: 20,\r\n left: 20,\r\n height: 30,\r\n width: 150,\r\n title: 'Left Arrow'\r\n});\r\nb1.addEventListener('click', function(e) {\r\n showGallery(b1, Ti.UI.iPad.POPOVER_ARROW_DIRECTION_LEFT);\r\n });\r\nwin.add(b1);\r\n\r\nvar b2 = Ti.UI.createButton({\r\n top: b1.top + 40,\r\n left: b1.left,\r\n height: 30,\r\n width: 150,\r\n title: 'Any Arrow'\r\n});\r\nb2.addEventListener('click', function(e) {\r\n showGallery(b2, Ti.UI.iPad.POPOVER_ARROW_DIRECTION_ANY);\r\n});\r\nwin.add(b2);\r\n\r\nvar b3 = Ti.UI.createButton({\r\n top: b2.top + 40,\r\n left: b2.left,\r\n height: 30,\r\n width: 150,\r\n title: 'Right Arrow'\r\n});\r\nb3.addEventListener('click', function(e) {\r\n showGallery(b3, Ti.UI.iPad.POPOVER_ARROW_DIRECTION_RIGHT);\r\n});\r\nwin.add(b3);\r\n\r\nvar b4 = Ti.UI.createButton({\r\n top: 250,\r\n left: 250,\r\n height: 30,\r\n width: 150,\r\n title: 'Left Arrow'\r\n});\r\nb4.addEventListener('click', function(e) {\r\n showGallery(b4, Ti.UI.iPad.POPOVER_ARROW_DIRECTION_LEFT);\r\n});\r\nwin.add(b4);\r\n\r\nvar b5 = Ti.UI.createButton({\r\n top: b4.top + 40,\r\n left: b4.left,\r\n height: 30,\r\n width: 150,\r\n title: 'Any Arrow'\r\n});\r\nb5.addEventListener('click', function(e) {\r\n showGallery(b5, Ti.UI.iPad.POPOVER_ARROW_DIRECTION_ANY);\r\n});\r\nwin.add(b5);\r\n\r\nvar b6 = Ti.UI.createButton({\r\n top: b5.top + 40,\r\n left: b5.left,\r\n height: 30,\r\n width: 150,\r\n title: 'Right Arrow'\r\n});\r\nb6.addEventListener('click', function(e) {\r\n showGallery(b6, Ti.UI.iPad.POPOVER_ARROW_DIRECTION_RIGHT);\r\n});\r\nwin.add(b6);\r\n\r\nvar b7 = Ti.UI.createButton({\r\n top: 500,\r\n left: 500,\r\n height: 30,\r\n width: 150,\r\n title: 'Left Arrow'\r\n});\r\nb7.addEventListener('click', function(e) {\r\n showGallery(b7, Ti.UI.iPad.POPOVER_ARROW_DIRECTION_LEFT);\r\n});\r\nwin.add(b7);\r\n\r\nvar b8 = Ti.UI.createButton({\r\n top: b7.top + 40,\r\n left: b7.left,\r\n height: 30,\r\n width: 150,\r\n title: 'Any Arrow'\r\n});\r\nb8.addEventListener('click', function(e) {\r\n showGallery(b8, Ti.UI.iPad.POPOVER_ARROW_DIRECTION_ANY);\r\n});\r\nwin.add(b8);\r\n\r\nvar b9 = Ti.UI.createButton({\r\n top: b8.top + 40,\r\n left: b8.left,\r\n height: 30,\r\n width: 150,\r\n title: 'Right Arrow'\r\n});\r\nb9.addEventListener('click', function(e) {\r\n showGallery(b9, Ti.UI.iPad.POPOVER_ARROW_DIRECTION_RIGHT);\r\n});\r\nwin.add(b9);\r\n\r\nwin.open()\r\n{code}\r\n\r\nh3. Test 2\r\n\r\nYou can also recreate the behavior by running the Kitchen Sink (not Kitchen Sink iPad) project in the iOS iPad Simulator in portrait orientation.\r\n\r\nOn the Phone tab, tap the Photo Gallery row in the table view. The Photo Gallery will appear in the correct position in the resulting view. In the script, [photo_gallery.js|https://github.com/appcelerator/titanium_mobile/blob/master/demos/KitchenSink/Resources/examples/photo_gallery.js], change lines 6 and 7 from...\r\n\r\n{code}\r\ntop:20,\r\nleft:10,\r\n{code}\r\n\r\nto...\r\n\r\n{code}\r\ntop:200,\r\nleft:100,\r\n{code}\r\n\r\nYou will see that the popover appears too far down and to the right of the image view.\r\n\r\nNow change the lines to:\r\n\r\n{code}\r\ntop:400,\r\nleft:400,\r\n{code}\r\n\r\n...and the popover will open off-screen. You can tell that it is open by trying to tap the \"Phone\" (back) button. Your first tap will be ignored, because it serves to close the popover. The second tap will return you to the table view.\r\n\r\nIf you change the arrowDirection in line 20 as follows:\r\n\r\n{code}\r\narrowDirection = Ti.UI.iPad.POPOVER_ARROW_DIRECTION_RIGHT; // From POPOVER_ARROW_DIRECTION_LEFT\r\n{code}\r\n\r\n...the popover will be visible again, but still not open where I'd expect.\r\n", "attachment": [], "flagged": false, "summary": "iOS: Media - openPhotoGallery opens popover in wrong position when popoverView is set", "creator": { "name": "brad@inspiringapps.com", "key": "brad@inspiringapps.com", "displayName": "Brad Weber", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "brad@inspiringapps.com", "key": "brad@inspiringapps.com", "displayName": "Brad Weber", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "* Titanium Mobile SDK 1.8.0.1.fbdc96f, 1.7.6.v20111209013042.c0d8707, 1.7.5\r\n* iOS 5.0\r\n* iOS (iPad) simulator and iPad device\r\n* OSX 10.6.8\r\n* Titanium Studio 1.1.0.201112161928\r\n", "comment": { "comments": [ { "id": "177350", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Thanks for raising this ticket.\r\n\r\nIn order for me to escalate it to the core team, all the fields must be complete. Please check it against the [JIRA Ticket Checklist|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist], and add any missing information in the correct fields.\r\n\r\nFurthermore, a test case is required, as per the [Creating a Test Case|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase] section.\r\n\r\nI will mark this resolved for now. Please reopen it once it is complete, and I will move it to the main project.\r\n\r\nCheers\r\n", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-27T18:22:40.000+0000", "updated": "2011-12-27T18:22:40.000+0000" }, { "id": "177354", "author": { "name": "brad@inspiringapps.com", "key": "brad@inspiringapps.com", "displayName": "Brad Weber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It looks like you reformatted my submission to better conform with the Ticket Checklist. Is that complete, or do you expect more changes from me?\r\n\r\nI thought I'd provided a simple test case by identifying a two-line change in the Kitchen Sink that will allow you to reproduce the issue. Would you instead like me to create a new project to demonstrate the unexpected behavior and satisfy your test case request?", "updateAuthor": { "name": "brad@inspiringapps.com", "key": "brad@inspiringapps.com", "displayName": "Brad Weber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T19:20:06.000+0000", "updated": "2011-12-27T19:20:06.000+0000" }, { "id": "177357", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Hi Brad\r\n\r\nA ticket must be self-contained, I'm afraid. Would you add a code block containing the smallest possible test case, that runs without modification when pasted into a blank app.js file? Again, see [Creating a Test Case|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase].\r\n\r\nAlso, please complete the environment field.\r\n\r\nOnce this is done, I will be able to escalate it.\r\n\r\nThanks for your help and patience! ;)\r\n\r\n", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-27T20:03:25.000+0000", "updated": "2011-12-27T20:03:25.000+0000" }, { "id": "177359", "author": { "name": "brad@inspiringapps.com", "key": "brad@inspiringapps.com", "displayName": "Brad Weber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've attached a simple app.js file that adds three sets of three buttons to a window. Each button click should trigger the display of the Photo Gallery in a popover, with the popover pointing to the clicked button. The button label indicates the value that is set for arrowDirection.\r\n\r\nNotice that the lower right \"Left Arrow\" button causes the Photo Gallery popover to open off screen. And the rest appear in unexpected positions and/or pointed to unexpected coordinates.", "updateAuthor": { "name": "brad@inspiringapps.com", "key": "brad@inspiringapps.com", "displayName": "Brad Weber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T21:06:33.000+0000", "updated": "2011-12-27T21:06:33.000+0000" }, { "id": "201013", "author": { "name": "towerofl", "key": "towerofl", "displayName": "Shin Morichika", "active": true, "timeZone": "America/Los_Angeles" }, "body": "My app was rejected from App Store because of this bug.\r\n\r\nReasons for Rejection:\r\n\"Specifically, we noticed your app contained popover elements that didn't point to the element that revealed them. To avoid user confusion, a popover element's arrow should point to the element that revealed it. \"\r\n\r\nPlease fix this as soon as possible.\r\nThank you.", "updateAuthor": { "name": "towerofl", "key": "towerofl", "displayName": "Shin Morichika", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-30T08:08:30.000+0000", "updated": "2012-06-30T08:08:30.000+0000" }, { "id": "207764", "author": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Teated on: \r\nTitanium SDK: 2.2.0.v20120716092112\r\nTitanium Studio, build: 2.1.1.201207121732\r\nDevice: iPad 5.1.\r\n\r\nInitial location of every pop-up is un accurate. When click on a lower Right Arrow button in portrait mode pop-up goes off screen.", "updateAuthor": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T11:53:09.000+0000", "updated": "2012-07-16T11:53:09.000+0000" }, { "id": "207772", "author": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with latest master and everything works as suppose to.", "updateAuthor": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T12:11:52.000+0000", "updated": "2012-07-16T12:11:52.000+0000" }, { "id": "207777", "author": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with SDK 2.2.0.v20120716092112\r\nand iPad 5.1", "updateAuthor": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T12:14:25.000+0000", "updated": "2012-07-16T12:14:25.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }