{ "id": "64147", "key": "TIMOB-3515", "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": "11357", "description": "Mobile 1.8.0 M04", "name": "Sprint 2011-25", "archived": true, "released": true, "releaseDate": "2011-06-27" } ], "resolution": { "id": "6", "description": "", "name": "Hold" }, "resolutiondate": "2011-06-23T13:48:25.000+0000", "created": "2011-04-15T03:46:10.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "defect", "ios", "ipad", "klist", "rplist", "scrolling", "webview" ], "versions": [], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-07T18:04:57.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": "{html}

Problem

\r\n

When embedding a YouTube video there is no way to disable\r\nscrolling within the webview.

\r\n

Test Code

\r\n

Adding this to your html should disable scrolling, and does\r\nunless the html content is the embed code from YouTube:

\r\n
\r\n<html>\r\n<head>\r\n<script type=\"text/javascript\">document.addEventListener(\"touchmove\", touchHandler, false);function touchHandler(e) { if(e.touches.length == 1) { e.preventDefault(); } }</script>\r\n<style type=\"text/css\">div#test { background: #ca0000; height: 495px; width: 680px; }</style>\r\n</head>\r\n
\r\n

Here is complete testing code:

\r\n
\r\nvar win = Titanium.UI.createWindow();\r\n\r\nvar default_video_html = '<html><head>\r\n<script type=\"text/javascript\">document.addEventListener(\"touchmove\", touchHandler, false);function touchHandler(e) { if(e.touches.length == 1) { e.preventDefault(); } }</script>\r\n<style type=\"text/css\">div#test { background: #ca0000; height: 495px; width: 680px; }</style>\r\n</head><body><object width=\"680\" height=\"495\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"><param value=\"http://www.youtube.com/v/[videoid]&amp;autoplay=1\" name=\"movie\"><param value=\"transparent\" name=\"wmode\"><param value=\"true\" name=\"allowfullscreen\"><embed width=\"680\" height=\"495\" allowfullscreen=\"true\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" src=\"http://www.youtube.com/v/b661ovU1rPU&amp;autoplay=1\"></object></body></html>';\r\n\r\nvar web_videobox = Ti.UI.createWebView({\r\n    height: 510,\r\n    width: 690,\r\n    backgroundColor:'#000000',\r\n    html: default_video_html\r\n});\r\n\r\nwin.add(web_videobox);\r\nwin.open();\r\n
\r\n

Replace the youtube object with any other html and you will see\r\nthat scrolling is disabled.

\r\n

May need to be tested on device. Specifically iPad

\r\n

Ticket Reference

\r\n

http://support-admin.appcelerator.com/display/EMP-64323-566

{html}", "attachment": [], "flagged": false, "summary": "Cannot disable scroll in webview containing embeded YouTube video", "creator": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "157693", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is an Apple UIWebView bug. This can be seen by checking the same html code in Safari and it would show the same behavior. The scroll on the webview itself is being disabled, only the scroll on youtube video cannot be disabled.", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-23T13:48:25.000+0000", "updated": "2011-06-23T13:48:25.000+0000" }, { "id": "409520", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-07T18:04:57.000+0000", "updated": "2017-03-07T18:04:57.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }