{ "id": "94158", "key": "TIMOB-9847", "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": "15108", "description": "2013 Sprint 10", "name": "2013 Sprint 10", "archived": true, "released": true, "releaseDate": "2013-05-20" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-05-03T07:32:51.000+0000", "created": "2012-06-29T14:22:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "core" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-17T18:46:48.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. Problem description\r\nPopover does not change it's direction when it is opened and device orientation it's being turned\r\n\r\nh3. Steps to reproduce\r\nRun the app and open the popover in Portrait mode.\r\nChange orientation to landscape.\r\nResult: popover direction it's still the one shown in portrait mode\r\nClose the popover and reopen it.\r\nResult: popover direction it's now shown in the correct expected direction.\r\n\r\nThis is causing another user experience problem:\r\nOpen the popover in Portrait mode and focus one of the textFields.\r\nChange orientation in landscape.\r\nResult: Since the keyboard it's opened, the popover is also reduced in dimension and the first fields are no longer visible. The user has to close the popover and reopen it again.\r\n\r\nSee sample code.\r\n\r\nh5. app.js\r\n{code}\r\nvar Popover = require('popover');\r\n\r\nvar window = Ti.UI.createWindow();\r\nvar popover = new Popover();\r\n\r\nvar button = Ti.UI.createButton({\r\n title:'Popover',\r\n width:300,\r\n height:50,\r\n top:100\r\n});\r\nbutton.addEventListener('click', function() {\r\n popover.show({view:button, animated:true});\r\n});\r\n\r\nwindow.add(button);\r\n\r\nwindow.open();\r\n{code}\r\n\r\n\r\n\r\nh5. popover.js\r\n{code}\r\nfunction TestPopover() {\r\n var popover = Ti.UI.iPad.createPopover({\r\n width:380,\r\n height:350,\r\n title:'Popover view',\r\n barColor:'#111',\r\n backgroundColor:'white'\r\n });\r\n\r\n popover.add(buildContentView());\r\n\r\n Ti.Gesture.addEventListener('orientationchange', function(e) {\r\n\r\n Ti.API.info(\"Orientation changed, Update popover arrow direction\");\r\n switch (Titanium.Gesture.orientation) {\r\n case Titanium.UI.LANDSCAPE_LEFT:\r\n popover.setArrowDirection(Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_RIGHT);\r\n break;\r\n case Titanium.UI.LANDSCAPE_RIGHT:\r\n popover.setArrowDirection(Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_RIGHT);\r\n break;\r\n case Titanium.UI.PORTRAIT:\r\n popover.setArrowDirection(Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_UP);\r\n break;\r\n case Titanium.UI.UPSIDE_PORTRAIT:\r\n popover.setArrowDirection(Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_UP);\r\n break;\r\n }\r\n });\r\n\r\n return popover;\r\n}\r\n\r\nfunction buildContentView() {\r\n var contentView = Ti.UI.createView({top:10,left:0,width:\"auto\", height:\"auto\", backgroundColor:'white', layout:'vertical'});\r\n\r\n contentView.add(labelledInputFieldFor(\"Name\"));\r\n contentView.add(labelledInputFieldFor(\"Address\"));\r\n contentView.add(labelledInputFieldFor(\"Phone Number\"));\r\n contentView.add(labelledInputFieldFor(\"Mobile Number\"));\r\n contentView.add(labelledInputFieldFor(\"Email Address\"));\r\n\r\n return contentView;\r\n}\r\n\r\nfunction labelledInputFieldFor(text) {\r\n var view = Ti.UI.createView({top:5, width:380, height:40,left:15, layout:'horizontal'});\r\n view.add(labelWith(text));\r\n view.add(inputFieldFor(text));\r\n return view;\r\n}\r\n\r\nfunction labelWith(text) {\r\n return Ti.UI.createLabel({text:text,font:{fontSize:16,fontWeight:'bold'}, left:10, width:120, height:'auto'});\r\n}\r\n\r\nfunction inputFieldFor(label) {\r\n return Titanium.UI.createTextField({multiline:false, clearButtonMode:Titanium.UI.INPUT_BUTTONMODE_ALWAYS,height:35,\r\n left:10, width:200, font:{fontSize:16}, color:'black', hintText:'Enter ' + label, wordWrap:true,\r\n borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n returnKeyType:Titanium.UI.RETURNKEY_NEXT});\r\n}\r\n\r\nmodule.exports = TestPopover;\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: iPad popover does not change direction when opened and changing orientation", "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 all versions tested\r\niPad 5", "comment": { "comments": [ { "id": "250059", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "cannot reproduce\r\n\r\nTested with\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0\r\niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-03T07:32:51.000+0000", "updated": "2013-05-03T07:32:51.000+0000" }, { "id": "413599", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-17T18:46:48.000+0000", "updated": "2017-03-17T18:46:48.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }