{ "id": "115364", "key": "TIMOB-14111", "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": null, "resolutiondate": null, "created": "2013-06-03T13:36:26.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "defect", "ios", "webview" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:49.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Problem*\r\nI have a local HTML file that I would like to open in a webview in a window. The file contains HTML anchors and I would like the view to position itself to that anchor when it opens.\r\n\r\n*Note*\r\nIt works on Android. The file opens in the webview positioned at the myanchorpoint anchor.\r\n\r\n*app.js*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"#FFF\"\r\n});\r\n\r\nvar webview = Titanium.UI.createWebView({\r\n\turl : 'mypage.html#myanchorpoint'\r\n});\r\nwin.add(webview);\r\n\r\nwin.open();\r\n{code}\r\n\r\n*mypage.html*\r\n{code:html}\r\n\r\n\t\r\n\t\tTest\r\n\t\r\n\t\r\n\t\tGo to my anchor point\r\n\t\t
\r\n\t\tMy Anchor Point\r\n\t\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Problem with webviews with anchors not scrolling to correct location in local files", "creator": { "name": "unoengborg", "key": "unoengborg", "displayName": "Uno Engborg", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "unoengborg", "key": "unoengborg", "displayName": "Uno Engborg", "active": true, "timeZone": "Europe/Berlin" }, "environment": "MacOS-X, iPhone simulator,\r\n\r\nTitanium Studio, build: 3.1.1.201305282249\r\n(c) Copyright 2012-2013 by Appcelerator, Inc. All rights reserved.\r\n\r\nBuild: jenkins-titanium-rcp-master-446 (origin/master)\r\nDate: 28 May 2013, 22:52:30\r\n\r\nTitanium SDK 3.1.0 GA", "comment": { "comments": [ { "id": "255560", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on iOS 6 simulator with Ti SDK 3.1.1 RC and 3.2 CI.\n\nHowever, the anchor point doesn't work on Android either (2.3.6). Can you test my code in a standard project? What Android version/device/emulator are you using?\n\nBtw, the reason I changed it from Alloy is that it's almost certainly not an Alloy issue; Alloy just wraps the underlying behavior.\n\nThanks", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-03T19:06:47.000+0000", "updated": "2013-06-03T19:06:47.000+0000" }, { "id": "255635", "author": { "name": "unoengborg", "key": "unoengborg", "displayName": "Uno Engborg", "active": true, "timeZone": "Europe/Berlin" }, "body": "It works on Android 4.2.1 (tested on a Galaxy Nexus device)", "updateAuthor": { "name": "unoengborg", "key": "unoengborg", "displayName": "Uno Engborg", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-06-03T22:14:47.000+0000", "updated": "2013-06-03T22:14:47.000+0000" }, { "id": "256005", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've escalated it, but I still can't get it to work on Android. On 4.0+ devices I just get \"Webpage not available\" when adding the hash at the end of the file. Below 4.0 devices run but don't move to the anchor point like iOS. Maybe a bug needs to be filed for that as well, but for this report we'll focus on iOS since that's what you requested.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-04T23:28:12.000+0000", "updated": "2013-06-04T23:28:12.000+0000" }, { "id": "429554", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue was sitting silently here for a while because the anchors were just working fine until iOS 11.0.3. Now they stop to scroll to desired location on the local HTML page.\r\nI've found this: https://medium.com/@marknote/the-odd-uiwebview-anchor-issue-with-ios-11-a57e9c164d3 which as far as I understand parses the link and scroll manually to the elementID. Besides that, I couldn't find anything else related to this issue. Do you have any idea?\r\nThanks!", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-25T09:38:44.000+0000", "updated": "2017-10-25T09:38:44.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }