{ "id": "118401", "key": "TIMOB-14849", "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": "15597", "description": "2013 Sprint 17", "name": "2013 Sprint 17", "archived": true, "released": true, "releaseDate": "2013-08-23" }, { "id": "15599", "description": "2013 Sprint 17 API", "name": "2013 Sprint 17 API", "archived": true, "released": true, "releaseDate": "2013-08-23" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-08-13T17:35:04.000+0000", "created": "2013-08-13T10:32:19.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-3.1.2" ], "versions": [ { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T22:04:33.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": " Javascript click event is not registered when parent webview's click event is also handled. This is not regression since the issue occurs on 3.1.1 GA as well.\r\n\r\nSteps to reproduce:\r\n\r\n1. Create an app using the code below.\r\n2. Launch the app.\r\n3. Click on 'click me' label.\r\n\r\nExpected:\r\nAlert should appear on screen with message \"123456\"\r\n\r\nActual:\r\nNo alert appears with the above message.\r\n\r\n{code}\r\nvar _window = Titanium.UI.createWindow({ \r\n \r\n backgroundColor:'#fff'\r\n});\r\n_window.backgroundColor = 'yellow'\r\n\r\n\t_window.addEventListener('click', function(e) {\r\n\t\talert('Window clicked');\r\n\t});\r\n\tvar webView = Titanium.UI.createWebView({\r\n\t\ttop : 30\r\n\t});\r\n\tvar html = '' + '' + '
' + '
' + '
' + '
' + '
' + '
' + 'Click me!' + '' + '';\r\n\twebView.html = html;\r\n\twebView.addEventListener('click', function(e) {\r\n\t\talert('WebView Clicked');\r\n\t});\r\n\t_window.add(webView);\r\n _window.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: JavaScript click event is not registered when parent webview's click event is also handled", "creator": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 3.1.2.v20130809141556\r\nAppcelertaor Studio: 3.1.2.201308091728\r\nOS: OSX 10.8.4\r\nDevice: iPhone5(v 6.1.4)\r\nXcode: 4.6.3", "comment": { "comments": [ { "id": "266249", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Webview has a property [webview.willHandleTouches|http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.WebView-property-willHandleTouches] do with this exact issue. On iOS we can choose to either handle all the events inside the html itself or have the webview and its parent have and not both at the same time. By setting this property to false, the alert 123456 will be fired properly. Refer documentation for more infromation.\n\nTest with following code same to get the correct behavior. \n\n{code}\nvar _window = Titanium.UI.createWindow({ \n\tbackgroundColor:'#fff'\n});\n_window.backgroundColor = 'yellow'\n\n_window.addEventListener('click', function(e) {\n\talert('Window clicked');\n});\nvar webView = Titanium.UI.createWebView({\n\ttop : 30\n});\nvar html = '' + '' + '
' + '
' + '
' + '
' + '
' + '
' + 'Click me!' + '' + '';\nwebView.html = html;\nwebView.willHandleTouches = false;\nwebView.addEventListener('click', function(e) {\n\talert('WebView Clicked');\n});\n_window.add(webView);\n_window.open();\n\n{code}\n\nMarking ticket as invalid. \n\n", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-13T17:34:39.000+0000", "updated": "2013-08-13T17:34:39.000+0000" }, { "id": "408952", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T22:04:33.000+0000", "updated": "2017-03-03T22:04:33.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }