{ "id": "103512", "key": "TIMOB-11511", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14168", "description": "2012 Sprint 22 API", "name": "2012 Sprint 22 API", "archived": true, "released": true, "releaseDate": "2012-11-05" }, { "id": "14274", "description": "2012 Sprint 22", "name": "2012 Sprint 22", "archived": true, "released": true, "releaseDate": "2012-11-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-10-29T21:03:29.000+0000", "created": "2012-10-16T22:51:32.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Regression", "api", "developer-preview", "module_popover", "qe-review", "qe-testadded", "triage" ], "versions": [], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-01-08T02:54:11.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": [], "description": "h3. Problem description\r\nIt is not possible to set height/width to automatically size on the Popover contents.\r\nIn 1.8.2 the 'auto' property was working fine as expected.\r\nWith 2.0 and major, both using 'auto' or Ti.UI.SIZE, the height and weight values are set to zero.\r\nAlso without specifying height and width values, those are set to zero.\r\n\r\nSee attached sample code:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'gray'\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n\tright:20,\r\n\theight:Ti.UI.SIZE,\r\n\twidth:100,\r\n\tbackgroundColor:'white',\r\n\tborderColor:'black',\r\n});\r\nvar label = Ti.UI.createLabel({\r\n\ttext:\"Click for opening the Popover\"\r\n});\r\nview.add(label);\r\n\r\nvar contentView = Ti.UI.createView({\r\n\theight:200,\r\n\twidth:150,\r\n\tbackgroundColor:'blue'\r\n});\r\nvar popover = Ti.UI.iPad.createPopover({\r\n width: Ti.UI.SIZE,\r\n height: Ti.UI.SIZE,\r\n title: 'Title',\r\n});\r\npopover.add(contentView);\r\n\r\nwin.addEventListener('click', function(){\r\n\tpopover.show({view:view});\r\n});\r\n\r\nwin.add(view);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Popover 'height' and 'width' cannot be automatically set ", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK > 2.0\r\niPad (tested on 5.1)", "comment": { "comments": [ { "id": "225141", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR against master https://github.com/appcelerator/titanium_mobile/pull/3335\n", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-26T18:40:04.000+0000", "updated": "2012-10-26T18:40:04.000+0000" }, { "id": "225575", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Backport PR https://github.com/appcelerator/titanium_mobile/pull/3354", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-10-30T21:15:54.000+0000", "updated": "2012-10-30T21:15:54.000+0000" }, { "id": "233512", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with:\r\nSDK: 3.0.0GA, 3.1.0.v20130107133402\r\nStudio: 3.0.1.201212181159\r\nDevice: iPad2(v 5.1)\r\n\r\nPopover height and width are automatically set.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-08T02:54:11.000+0000", "updated": "2013-01-08T02:54:11.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }