{ "id": "61763", "key": "TIMOB-1131", "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": "11224", "name": "Release 1.4.0", "archived": true, "released": true, "releaseDate": "2010-07-16" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-04-15T02:44:52.000+0000", "created": "2011-04-15T02:44:52.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-02T19:22:02.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}

Base UI => Views => Mixing Views

\n

top view is a web with this:

\n

document.body.addEventListener(\"touchmove\", function(e)\n{e.preventDefault();}, false);

\n

but it still scrolls - this had worked previously

{html}", "attachment": [], "flagged": false, "summary": "preventDefault not working in web view", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124922", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Ran the test against HEAD, Base UI -> Views -> Mixing\nViews and tried to scroll the web view. With this line in it, it\ndidn't scroll. With the line removed, it did. Seems like\npreventDefault() works.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:44:52.000+0000", "updated": "2011-04-15T02:44:52.000+0000" }, { "id": "124923", "author": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

which line are you talking about?

{html}", "updateAuthor": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:44:52.000+0000", "updated": "2011-04-15T02:44:52.000+0000" }, { "id": "124924", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

The line in question:

\n

document.body.addEventListener(\"touchmove\", function(e)\n{e.preventDefault();}, false);

\n

When the HTML reads:

\n
\nvar html = '<html><body style=\";color:#bbb;font-family:Helvetica Neue;text-align:center;\">';\nhtml += '<div style=\"font-size:20;font-weight:bold;\">I am a web view</div>';\nhtml += '<div id=\"foo\" style=\"font-size:14;font-weight:bold;\">click me</div>';\nhtml += '<script>document.getElementById(\"foo\").ontouchstart = function()';\nhtml += '{Ti.App.fireEvent(\"webview_click\");document.body.addEventListener(\"touchmove\", function(e) {e.preventDefault();}, false);};</script>';\nhtml += '</body></html>';\n
\n

(with the event listener present) things work. More accurately,\nit worked in 3.2 simulator.

\n

Additional confirmation on this might be good. I'll test on 3.1\nand 4.0 device.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:44:52.000+0000", "updated": "2011-04-15T02:44:52.000+0000" }, { "id": "124925", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Confirmed. Doesn't work in 3.1, does work in 3.2 and 4.0. Must\nbe a Safari thing.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:44:53.000+0000", "updated": "2011-04-15T02:44:53.000+0000" }, { "id": "408438", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closed as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-02T19:22:02.000+0000", "updated": "2017-03-02T19:22:02.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }