{ "id": "171072", "key": "TIMOB-25765", "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": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-02-22T23:32:21.000+0000", "created": "2018-02-09T01:43:11.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" }, { "id": "19988", "description": "", "name": "Release 7.0.1", "archived": false, "released": true, "releaseDate": "2017-12-21" } ], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-02-23T16:20:41.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": "h6.Reproduce \r\n1. Add following into a default classic project.\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({\r\n backgroundColor: 'blue',\r\n layout: 'vertical',\r\n title: 'Window 1',\r\n includeOpaqueBars: true,\r\n extendEdges: [Ti.UI.EXTEND_EDGE_TOP]\r\n});\r\n\r\nvar win2 = Titanium.UI.createWindow({\r\n backgroundColor: 'blue',\r\n layout: 'vertical',\r\n title: 'Window 2',\r\n includeOpaqueBars: true,\r\n extendEdges: [Ti.UI.EXTEND_EDGE_TOP]\r\n});\r\n\r\nvar navWin = Titanium.UI.iOS.createNavigationWindow({\r\n window: win1\r\n});\r\n\r\nvar label1 = Ti.UI.createLabel({\r\n width: '90%',\r\n text: 'You can see the red of the view extends underneath the navigation bar. This is expected and how it works in android. It works this way only when the entire contents of the scrollview fit on the screen.'\r\n});\r\n\r\nvar label2 = Ti.UI.createLabel({\r\n width: '90%',\r\n top: 200,\r\n text: 'On this window the view added to the scrollView has a height larger than the size of the device. When this is the case the view is positioned after the end of the navigation bar. I should not be able to see the green of the scrollview through the navigation bar.'\r\n});\r\n\r\nvar scrollView1 = Ti.UI.createScrollView({\r\n backgroundColor: 'green',\r\n scrollType: 'vertical',\r\n layout: 'vertical',\r\n top: 0\r\n});\r\n\r\nvar scrollView2 = Ti.UI.createScrollView({\r\n backgroundColor: 'green',\r\n scrollType: 'vertical',\r\n layout: 'vertical',\r\n top: 0\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: \"Open new Window with larger view\",\r\n backgroundColor: '#eee',\r\n bottom: 50\r\n});\r\n\r\nbtn.addEventListener('click', function(){\r\n navWin.openWindow(win2);\r\n});\r\n\r\nvar row = Ti.UI.createView({backgroundColor: 'red', width: Ti.UI.FILL, height: 500});\r\n\r\nvar largeRow = Ti.UI.createView({backgroundColor: 'red', width: Ti.UI.FILL, height: 4000});\r\n\r\nrow.add(btn);\r\nrow.add(label1);\r\nscrollView1.add(row);\r\nwin1.add(scrollView1);\r\n\r\nlargeRow.add(label2);\r\nscrollView2.add(largeRow);\r\nwin2.add(scrollView2);\r\n\r\nnavWin.open();\r\n{code}\r\n2. Run the app.Compare the window by clicking the button\r\n3. You will see the different odd behavior based on the size of its content. \r\n\r\na. If the height of the contents of the scrollView is less than the height of the device, the layout is as expected (I can see the view through the translucent navigation bar). \r\n\r\nb. If the height of the contents of the scrollView is greater than the height of the device, everything added to the scrollView is positioned below the navigation bar (as if an artificial offset is added to the top property of the view). This requires a view’s top property to be different based on the height of the scrollView. \r\n\r\nh6.Note\r\niOS only since this is iOS only property.", "attachment": [ { "id": "64863", "filename": "NavTest.zip", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-15T11:04:14.000+0000", "size": 47101, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS 11: Scrollview layout error when set window with includeOpaqueBars and extendEdges", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "iOS 11 only", "closedSprints": [ { "id": 1000, "state": "closed", "name": "2018 Sprint 04 SDK", "startDate": "2018-02-12T04:23:01.913Z", "endDate": "2018-02-26T04:23:00.000Z", "completeDate": "2018-02-26T19:36:01.769Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "434506", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~sliang] I can see this problem with iOS 11.x only. Are you sure this problem happening in iOS 10 and iOS 9 also, as you have mentioned same in ticket ?", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-15T03:52:28.000+0000", "updated": "2018-02-15T03:52:28.000+0000" }, { "id": "434510", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "[~vijaysingh]\r\nI do not have iOS 9 or 10 devices\r\nBut customer mentioned that tested iOS 9, 10, and 11 on various devices in the simulator and physical devices and the problem occurs on all of them.", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2018-02-15T06:22:31.000+0000", "updated": "2018-02-15T06:22:31.000+0000" }, { "id": "434512", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~sliang] It can be verified on simulator too. No need of device. Can you please re-check with customer, if this is happening on iOS 10 and iOS 9 also. It is happening to me on iOS 11.x only.\r\n[~ewieber] / [~amukherjee] Can you please verify this? Thanks!", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-15T06:53:28.000+0000", "updated": "2018-02-15T06:53:47.000+0000" }, { "id": "434517", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I verified the similar test case in native app and observation is as below -\r\n1. I have attached a native iOS app. In this app also, for iOS 11.x issue is there. For iOS < 11.0, it is working fine.\r\n2. In iOS 11 property \"automaticallyAdjustsScrollViewInsets\" is deprecated by apple and suggested to use scrollview's property \"contentInsetAdjustmentBehavior\".\r\n3. It looks for automaticallyAdjustsScrollViewInsets = YES, apple has managed backward compatibility properly but automaticallyAdjustsScrollViewInsets = NO, backward compatibility is not managed properly.\r\n4. If you uncomment lines in attached app, it will work fine.\r\n\r\nSolution is -\r\n4. We have to expose \"contentInsetAdjustmentBehavior\" property to developers.\r\n5. We have to map automaticallyAdjustsScrollViewInsets = YES with contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAlways and automaticallyAdjustsScrollViewInsets = NO with contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever for backward compatibility", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-15T11:30:56.000+0000", "updated": "2018-02-15T11:30:56.000+0000" }, { "id": "434518", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Sounds good Vijay!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-02-15T11:54:33.000+0000", "updated": "2018-02-15T11:54:33.000+0000" }, { "id": "434751", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master) - https://github.com/appcelerator/titanium_mobile/pull/9866\r\nPR(7_1_X) - https://github.com/appcelerator/titanium_mobile/pull/9867", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-22T07:04:54.000+0000", "updated": "2018-02-22T07:18:48.000+0000" }, { "id": "434797", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. Tested using the provided sample code and the scrollview and window test suites", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-02-22T23:32:21.000+0000", "updated": "2018-02-22T23:32:21.000+0000" }, { "id": "434820", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified changes are included in SDK builds: 7.1.0.v20180222163802 & 7.2.0.v20180223044652", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-02-23T16:20:41.000+0000", "updated": "2018-02-23T16:20:41.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }