{ "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\nWhen embedding a YouTube video there is no way to disable\r\nscrolling within the webview.
\r\nTest Code
\r\nAdding 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\nHere is complete testing code:
\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]&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&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\nReplace the youtube object with any other html and you will see\r\nthat scrolling is disabled.
\r\nMay need to be tested on device. Specifically iPad
\r\nTicket Reference
\r\n