{ "id": "171201", "key": "TIMOB-25815", "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": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2019-11-12T13:47:49.000+0000", "created": "2018-02-26T21:15:37.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-11-12T13:47:49.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Hello,\r\n\r\nHTML style \"position: absolute\" hiding the div or HTML element in Webview on Android. \r\n\r\n*Test Environment:*\r\nSDK: 7.0.2.GA\r\nAppcelerator Command-Line Interface, version 7.0.2\r\nAndroid Device: Samsung Gallaxy Grand prime (5.1.1)\r\n*Test Code:*\r\napp.js\r\n{code}\r\nvar webview = Titanium.UI.createWebView({\r\n\turl : 'test.html'\r\n});\r\nvar window = Titanium.UI.createWindow();\r\nwindow.add(webview); \r\nwindow.open();\r\n{code}\r\n\r\ntest.html\r\n{code}\r\n\r\n\r\n\r\n

This is a heading

\r\n\r\n\r\n{code}\r\n\r\nWhen we remove the style \"position: absolute\" its working fine for Android.\r\n\r\nNote: Same code is working fine for iOS.\r\n\r\nThanks", "attachment": [], "flagged": false, "summary": "Android: HTML style \"position: absolute\" hiding the div or HTML element in Webview", "creator": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": "WebView, Android, HTML Style", "comment": { "comments": [ { "id": "434943", "author": { "name": "mr.arbindbhagat", "key": "mr.arbindbhagat", "displayName": "Arbind", "active": true, "timeZone": "Europe/Copenhagen" }, "body": "It used to work before, and is no longer working. This issue has broken all of our apps. Please see if we can make it the high priority, as it is such a basic feature.", "updateAuthor": { "name": "mr.arbindbhagat", "key": "mr.arbindbhagat", "displayName": "Arbind", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2018-02-27T00:49:05.000+0000", "updated": "2018-02-27T00:49:05.000+0000" }, { "id": "435127", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mr.arbindbhagat] Thank you for the report. we will take a look and schedule a fix as soon as possible.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-02T19:13:06.000+0000", "updated": "2018-03-02T19:13:06.000+0000" }, { "id": "435134", "author": { "name": "mr.arbindbhagat", "key": "mr.arbindbhagat", "displayName": "Arbind", "active": true, "timeZone": "Europe/Copenhagen" }, "body": "Thank you Eric so much for giving this a priority.", "updateAuthor": { "name": "mr.arbindbhagat", "key": "mr.arbindbhagat", "displayName": "Arbind", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2018-03-02T20:48:13.000+0000", "updated": "2018-03-02T20:48:13.000+0000" }, { "id": "435143", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This appears to be a hardware acceleration bug on Google's end. In fact, it's a very common issue:\r\nhttps://stackoverflow.com/questions/17059899/android-webview-hardware-acceleration-artefact-workarounds\r\n\r\nSo, I've found 2 work-arounds:\r\n# Use a \"fixed\" position instead of \"absolute\", if possible. \"fixed\" doesn't appear to have this issue.\r\n# Add a border to your WebView. This will make Titanium disable hardware acceleration on the WebView.\r\n\r\nNote that Titanium used to disable hardware acceleration on the WebView in the past, which was not ideal. In our quest to optimize our UI, we've inadvertently revealed a bug on Google's end. Ideally, you don't want to disable hardware acceleration and work-around it in the HTML side instead for best performance.\r\n\r\nAlso, if you search this topic on stackoverflow, many native developers have found that setting CSS style {{\"webkit-backface-visibility: hidden;\"}} works-around this issue as well. I haven't tried it for myself, but that might be worth pursuing.\r\n\r\nDoes this help?", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-03T01:20:01.000+0000", "updated": "2018-03-03T01:20:01.000+0000" }, { "id": "435144", "author": { "name": "mr.arbindbhagat", "key": "mr.arbindbhagat", "displayName": "Arbind", "active": true, "timeZone": "Europe/Copenhagen" }, "body": "Hi Joshua,\r\n\r\n(1) Unfortunately, neither \"absolute\" is working, nor \"fixed\" is working. If either of these worked, we could position our items properly. But since neither of these two properties are working on Android, we are just not able to make our pages as our clients want it to be.\r\n\r\n(2) Yes, you are right. I don't want to disable the hardware acceleration.\r\n\r\n(3) \"webkit-backface-visibility: hidden;\" is also not making any difference at all.\r\n\r\nSo, do you have any other suggestion/work-around? Please advise.", "updateAuthor": { "name": "mr.arbindbhagat", "key": "mr.arbindbhagat", "displayName": "Arbind", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2018-03-03T05:23:07.000+0000", "updated": "2018-03-03T05:23:07.000+0000" }, { "id": "435207", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mr.arbindbhagat], setting it to \"fixed\" worked for me, but I had to scroll down to see the label. Not sure why Android's native WebView is using a larger page size (taller than the screen) compared to iOS by default.\r\n\r\nIf you're trying to fit all of the page's content within the screen so that the user does not have to scroll, then you can set the {{WebView.scalesPageToFit}} property to {{true}} to scale it down to fit. I recommend that you set this property when attempting to use the above mentioned work-arounds. Interestingly enough, the \"absolute\" position works-around the bug too, but it may render the content smaller then you'd like. Perhaps adjusting the html/viewport height might help with that on your end.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-05T19:21:11.000+0000", "updated": "2018-03-05T19:21:11.000+0000" }, { "id": "435211", "author": { "name": "mr.arbindbhagat", "key": "mr.arbindbhagat", "displayName": "Arbind", "active": true, "timeZone": "Europe/Copenhagen" }, "body": "Joshua, Thanks for your reply.\r\n\r\nI just now noticed that the \"absolute\" thing works all good in the 6.2.2 GA. I don't know if hardware acceleration was turned off in that version. May be, you would like to look towards that?", "updateAuthor": { "name": "mr.arbindbhagat", "key": "mr.arbindbhagat", "displayName": "Arbind", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2018-03-05T21:07:14.000+0000", "updated": "2018-03-05T21:07:14.000+0000" }, { "id": "435212", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mr.arbindbhagat], yes, hardware acceleration was disabled in the older versions because it was configured to use zero width border, but the fact that it had a border setting fooled the code into disable hardware acceleration. When we optimized the border handling (in Titanium 6.3.0 I believe), it ended up leaving hardware acceleration enabled, which is what most devs wanted, but also introduced this hardware acceleration bug on Google's end.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-05T21:40:21.000+0000", "updated": "2018-03-05T21:40:21.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }