{ "id": "61587", "key": "TIMOB-955", "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": "11363", "description": "Mobile 1.8.0 M10", "name": "Sprint 2011-31", "archived": true, "released": true, "releaseDate": "2011-08-08" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2011-07-27T11:22:41.000+0000", "created": "2011-04-15T02:40:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T19:06:21.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}

Hi there.

\r\n

When you add a EventListener for swipe either on a window (with\r\na webview) or at a webview, it'll disable scrolling the\r\nwebView.

\r\n

Howto reproduce:

\r\n

1) Create a new project
\r\n2) Add a webView to one of the windows (with enough content, so it\r\nscrolls...)
\r\n3) Add the EventListener to the window or view\r\n\"foo.addEventListener('swipe', function (e) {} )\"

\r\n

Every function will do, even empty ones.

{html}", "attachment": [], "flagged": false, "summary": "WebView + addEventListener('swipe', ...) disables scrolling", "creator": { "name": "maxmarttinen", "key": "maxmarttinen", "displayName": "Max Marttinen", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "maxmarttinen", "key": "maxmarttinen", "displayName": "Max Marttinen", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124447", "author": { "name": "maxmarttinen", "key": "maxmarttinen", "displayName": "Max Marttinen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Forgot:

\n

This affects the mobile sdk on ipad.
\nTestet with 1.2.x and 1.3.0.

{html}", "updateAuthor": { "name": "maxmarttinen", "key": "maxmarttinen", "displayName": "Max Marttinen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:40:08.000+0000", "updated": "2011-04-15T02:40:08.000+0000" }, { "id": "124448", "author": { "name": "thomasaylott", "key": "thomasaylott", "displayName": "Thomas Aylott", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Workaround:

\n

You could use custom webview url handler events instead.

\n

\nhttp://github.com/subtleGradient/titanium_mobile/tree/develop-webvi...

\n

Detect the swipe in your page's JavaScript and then fire an\nevent on the webView instance from the page.
\nEven works from external sites!

\n
\nwebView.addEventListener('my-swipe', handleSwipe)\n
\n

And then in the page…

\n
\nwindow.location = \"app-my-swipe://?_\" + +new Date;\n
\n

And it'll fire your 'my-swipe' event in your Titanium\ncontext.

{html}", "updateAuthor": { "name": "thomasaylott", "key": "thomasaylott", "displayName": "Thomas Aylott", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:40:09.000+0000", "updated": "2011-04-15T02:40:09.000+0000" }, { "id": "124449", "author": { "name": "thomasaylott", "key": "thomasaylott", "displayName": "Thomas Aylott", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

ug… broken formatting :/

{html}", "updateAuthor": { "name": "thomasaylott", "key": "thomasaylott", "displayName": "Thomas Aylott", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:40:09.000+0000", "updated": "2011-04-15T02:40:09.000+0000" }, { "id": "124450", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

May not be able to support this, because if you intercept swipes\non a webview, they stop working.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:40:09.000+0000", "updated": "2011-04-15T02:40:09.000+0000" }, { "id": "124451", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

This is happening, not only with the swipe event, but with any\ntouch events. Example:

\n
\n  var win = Titanium.UI.createWindow();\n    var web =  Titanium.UI.createWebView({url: 'some.pdf'});\n    var view = Ti.UI.createView({});\n    view.add(web);\n    win.add(view);\n    win.open({modal:true});\n\n    web.addEventListener('click', function(e){\n        alert('click');\n    });\n\n    /*\n    view.addEventListener('click', function(e){\n        alert('click');\n    });\n    */\n    /*\n    win.addEventListener('click', function(e){\n        alert('click');\n    });\n    */\n
\n

HD Ticket: http://developer.appcelerator.com/helpdesk/view/74881
\nTested on iPhone Simulator 4.2
\nTi SDK 1.6.0 RC1

{html}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:40:10.000+0000", "updated": "2011-04-15T02:40:10.000+0000" }, { "id": "160760", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Unfortunately, this is something we can't fix, as UIWebView, the underlying view, is quite a black box in iOS. Because of that, touch events have to be handled either exclusively by the titanium view holding the web view (IE, webview.addEventListener('swipe'...) ) or the native Webview (Ie, scrolling, buttons, etc.)\n\nAs a workaround, if you must have any handling inside the webview, make gesture recognizers inside the HTML itself, and generate an app event to relay it outside.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-27T11:22:41.000+0000", "updated": "2011-07-27T11:22:41.000+0000" }, { "id": "318429", "author": { "name": "ramakrishna.sriramoju@winwire.com", "key": "ramakrishna.sriramoju@winwire.com", "displayName": "Ramakrishna", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi,\r\n\r\n I did a quick fix. Hope this sample solution will help to have both swipe and scroll web view content.\r\n \r\n Index.xml:\r\n \r\n\t\r\n\t\t\t\t\r\n\t\t\r\n\t\r\n\r\n\r\nIndex.tss:\r\n\".container\": {\r\n\tbackgroundColor:\"77d065\"\r\n}\r\n\r\n\"#scrollView\":{\r\n\ttop:\"20%\",\r\n\twidth:\"100%\",\r\n\tbackgroundColor:\"red\"\t\r\n}\r\n\r\nIndex.js:\r\n\r\nvar webviewnews = [];\r\n\r\nfor(var i = 0; i < 6; i++){\r\n\twebviewnews[i] = Ti.UI.createWebView({\r\n\t\thideLoadIndicator : true,\r\n\t\twidth: \"100%\",\r\n\t\theight: \"100%\"\r\n\t});\t\r\n}\r\n\r\nwebviewnews[0].url = \"http://www.google.com\";\r\nwebviewnews[1].url = \"http://www.facebook.com\";\r\nwebviewnews[2].url = \"http://www.twitter.com\";\r\nwebviewnews[3].url = \"http://www.yahoo.com\";\r\nwebviewnews[4].url = \"http://www.flipkart.com\";\r\nwebviewnews[5].url = \"http://www.amazon.com\";\r\n\r\n$.scrollView.views = webviewnews;\r\n$.scrollView.setCurrentPage(2);\r\n\r\n$.scrollView.addEventListener('scrollend', function(e){\r\n\tTi.API.info('scrollend got called');\r\n\tvar position = $.scrollView.getCurrentPage();\r\n\t//Write logic here to dynamic load of web view content\r\n});\r\n\r\n$.index.open();\r\n\r\n\r\nHope this will help.", "updateAuthor": { "name": "ramakrishna.sriramoju@winwire.com", "key": "ramakrishna.sriramoju@winwire.com", "displayName": "Ramakrishna", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-13T12:42:50.000+0000", "updated": "2014-08-13T12:42:50.000+0000" }, { "id": "415736", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket with reference to the previous comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T19:06:21.000+0000", "updated": "2017-03-24T19:06:21.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }