{ "id": "152916", "key": "TIMOB-19924", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-04-12T14:57:09.000+0000", "created": "2015-11-12T02:07:35.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-5.1.0", "qe-6.1.0" ], "versions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" }, { "id": "16904", "description": "Release 5.0.2", "name": "Release 5.0.2", "archived": true, "released": true, "releaseDate": "2015-10-01" } ], "issuelinks": [ { "id": "54625", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "166642", "key": "TIMOB-24491", "fields": { "summary": "iOS: Webview scroll doesn't work inside a view with \"onClick\" in the xml", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "55019", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "168061", "key": "TIMOB-24763", "fields": { "summary": "iOS: Ti.App.fireEvent not working for webviews in scrollviews", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "49721", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "99699", "key": "TIMOB-10584", "fields": { "summary": "Android: WebView click event is not being fired", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-02T15:42:55.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": "*Details:* \"onclick\" event is not triggered in the WebView if you are listening to multiple \"click\" events.\r\n\r\n*Note:* This is *not a regression* as this occurs with the current GA stack.\r\n\r\n*Steps to reproduce:*\r\n# Create a Titanium classic project\r\n# Replace app.js with the following code:\r\n{code}\r\nvar window = Titanium.UI.createWindow({\r\n\tbackgroundColor: 'white'\r\n});\r\nwindow.addEventListener('click', function(e) {\r\n\talert('Window clicked');\r\n});\r\n\r\nvar webView = Titanium.UI.createWebView();\r\nwebView.addEventListener('click', function(e) {\r\n\talert('WebView Clicked');\r\n});\r\n \r\nvar html = '' + \r\n '' +\r\n '
' + \r\n '
' + \r\n '
' + \r\n '
' + \r\n '
' + \r\n '
' + \r\n 'Click me!' +\r\n '' + \r\n '';\r\nwebView.html = html;\r\n\r\nwindow.add(webView);\r\n\r\nwindow.open();\r\n{code}\r\n# Install app to device or simulator\r\n# Once app is launched, press on \"Click me!\"\r\n\r\n*Actual:* Only \"WebView Clicked\" and \"Window clicked\" alert dialogs appear; see attachment.\r\n\r\n*Expected:* Another alert dialog with \"123456\" should appear as well.", "attachment": [ { "id": "57378", "filename": "no_onclick.mov", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-12T02:07:05.000+0000", "size": 388561, "mimeType": "video/quicktime" }, { "id": "61789", "filename": "TestWebView.zip", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-07T08:35:56.000+0000", "size": 66217, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: \"onclick\" event is not triggered in the WebView if you are listening to multiple \"click\" events", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Appcelerator Studio, build: 4.4.0.201511101919\r\nAppc CLI NPM: 4.2.1\r\nAppc CLI Core: 5.0.4, 5.1.0-50\r\nSDK: 5.02.GA, 5.1.0.v20151110202023\r\nNode: v0.12.7, v4.2.2\r\nOS: El Capitan (10.11.1)\r\nXcode: 7.1.1\r\nDevices: iphone 6s (9.1), iphone 6 (8.2), iphone simulator (9.1)", "closedSprints": [ { "id": 871, "state": "closed", "name": "2017 Sprint 08 SDK", "startDate": "2017-04-10T15:40:31.217Z", "endDate": "2017-04-24T15:40:00.000Z", "completeDate": "2017-04-23T21:46:37.098Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "386523", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok so it appears the same happens when you monitor a swipe event of a scrollview in which the webview is embedded... Is there progress on this task?\r\n", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-05-23T19:39:13.000+0000", "updated": "2016-05-23T19:39:13.000+0000" }, { "id": "409475", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In iOS webview do not allow touch event. For allowing the same it is implemented using hitTest method. So I created a sample app(attached as TestWebView.zip) for same use case . Titanium app is behaving similar to native. \r\nIn native app if we allow touch event on webview, java script click event is not fired. If we do not allow touch event on webview in that case javascript click event is fired.\r\nIn app created using Titanium SDK, if we do not handle click event then javascript click event is called.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-07T08:38:11.000+0000", "updated": "2017-03-07T08:38:11.000+0000" }, { "id": "415974", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In doc http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.WebView, a note is mentioned for above behavior- \r\n\"iOS Platform Implementation Notes\r\nOn the iOS platform, the native web view handles scrolling and other related touch events internally. If you add event listeners on the web view or its parent views for any of the standard touch events (touchstart, click, and so on), these events do not reach the native web view, and the user will not be able to scroll, zoom, click on links, and so on. To prevent this default behavior, set willHandleTouches to false.\r\n\r\nIn other words, you can have either Titanium-style events against the web view instance, or internal JavaScript events in the DOM, but not both.\"\r\n\r\nSo the behavior in this ticket is expected.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-28T05:18:59.000+0000", "updated": "2017-03-28T05:18:59.000+0000" }, { "id": "415975", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "But for few titanium events - @\"singletap\",@\"doubletap\",@\"twofingertap\",@\"swipe\",@\"pinch\",@\"longpress\"\r\n we can allow native webview events as well. As above mentioned events are implemented in Titanium using UIGestureRecognizer, we can allow for multiple recognizer on webview. \r\n\r\nPR:https://github.com/appcelerator/titanium_mobile/pull/8913\r\n\r\n Should we do the same ? [~emerriman] [~hansknoechel] thoughts ?\r\n\r\n\r\nTest Case-\r\n\r\n\r\n{code:java}\r\nvar window = Titanium.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\nwindow.addEventListener('click', function(e) {\r\n alert('Window clicked');\r\n});\r\n\r\nvar webView = Titanium.UI.createWebView({\r\n top: 10,\r\n left: 10,\r\n width: 300,\r\n height: 300,\r\n backgroundColor : 'red'\r\n});\r\nwebView.addEventListener('singletap', function(e) {\r\n Ti.API.info('WebView: singletap event fired');\r\n});\r\nwebView.addEventListener('doubletap', function(e) {\r\n Ti.API.info('WebView: doubletap event fired');\r\n});\r\nwebView.addEventListener('twofingertap', function(e) {\r\n Ti.API.info('WebView: twofingertap event fired');\r\n});\r\nwebView.addEventListener('swipe', function(e) {\r\n Ti.API.info('WebView: swipe event fired');\r\n});\r\nwebView.addEventListener('pinch', function(e) {\r\n Ti.API.info('WebView: pinch event fired');\r\n});\r\nwebView.addEventListener('longpress', function(e) {\r\n Ti.API.info('WebView: longpress event fired');\r\n});\r\nwebView.addEventListener('click', function(e) {\r\n Ti.API.info('WebView: click event fired');\r\n});\r\nwebView.willHandleTouches = false;\r\n\r\nvar html = '' + \r\n '' +\r\n '
' + \r\n '
' + \r\n '
' + \r\n '
' + \r\n '
' + \r\n '
' + \r\n 'Click me!' +\r\n '' + \r\n '';\r\nwebView.html = html;\r\n\r\nwindow.add(webView);\r\n\r\nwindow.open();\r\n{code}", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-28T06:25:41.000+0000", "updated": "2017-03-28T06:25:41.000+0000" }, { "id": "417246", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Backported PR (6_1_X): https://github.com/appcelerator/titanium_mobile/pull/8956", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-12T03:53:32.000+0000", "updated": "2017-04-12T03:53:32.000+0000" }, { "id": "417357", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, \"onclick\" event now triggers correctly with multiple click events present. Tested for the added event types implemented from UIGestureRecognizer.\r\n\r\nTested On:\r\niPhone 7 10.2.1 Device\r\niPhone 5S 9.3.5 Device\r\nMac OS Sierra (10.12.2)\r\nTi SDK: 6.1.0.v20170412080612 / 6.2.0.v20170412105625\r\nAppc Studio: 4.8.1.201701192045\r\nAppc NPM: 4.2.9-1\r\nApp CLI: 6.1.0\r\nXcode 8.2.1\r\nNode v4.6.0\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2017-04-13T14:44:17.000+0000", "updated": "2017-04-13T14:44:17.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }