{ "id": "100283", "key": "TIMOB-10734", "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": "14624", "description": "2012 Sprint 24 JS", "name": "2012 Sprint 24", "archived": true, "released": true, "releaseDate": "2012-12-03" }, { "id": "14625", "description": "2012 Sprint 24 API", "name": "2012 Sprint 24 API", "archived": true, "released": true, "releaseDate": "2012-12-03" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2012-12-04T00:51:02.000+0000", "created": "2012-08-31T11:44:40.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-03-27T22:32:09.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": "Event handling for a webview does not match Android.\r\n\r\nTest Case Number 1:\r\n{code}\r\nvar window = Titanium.UI.createWindow();\r\n \r\nwindow.addEventListener('click', function(e) {\r\n alert('window click');\r\n})\r\n\r\n \r\nvar webView = Titanium.UI.createWebView();\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//webView.addEventListener('click', function(e) {\r\n // alert('webview click');\r\n//})\r\nwindow.add(webView);\r\nwindow.open();\r\n{code}\r\n\r\nExpected result: Click on \"Click me\" brings up 123456 alert.\r\n Click on background brings up \"window click\" alert.\r\n\r\nActual result: Click on \"Click me\" works as expected.\r\n Click on background has no effect.\r\n\r\n\r\nTest Case Number 2:\r\n{code}\r\nvar window = Titanium.UI.createWindow();\r\n \r\nwindow.addEventListener('click', function(e) {\r\n alert('window click');\r\n})\r\n\r\n \r\nvar webView = Titanium.UI.createWebView();\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\nwebView.addEventListener('click', function(e) {\r\n alert('webview click');\r\n})\r\nwindow.add(webView);\r\nwindow.open();\r\n{code}\r\nExpected result: Clicking on \"click me\" brings up 3 alerts, one for\r\n the link, one for the webview, and one for the window.\r\n\r\n Clicking on the background brings up 2 alerts -- one\r\n for the webview and one for the window.\r\n\r\nActual result: Clicking anywhere brings up two alerts -- one for the webview\r\n and one for the window. Clicking on the \"Click me\" link has\r\n the same effect, and the \"123456\" alert is never displayed.\r\n\r\n\r\n\r\nTest Case Number 3:\r\n\r\n{code}\r\nvar window = Titanium.UI.createWindow();\r\n \r\n//window.addEventListener('click', function(e) {\r\n // alert('window click');\r\n//})\r\n\r\n \r\nvar webView = Titanium.UI.createWebView();\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\nwebView.addEventListener('click', function(e) {\r\n alert('webview click');\r\n})\r\nwindow.add(webView);\r\nwindow.open();\r\n{code}\r\nExpected result: Clicking on \"Click me\" brings up \"123456\" alert and also \"webview clicked\" alert.\r\n Clicking on background brings up \"webview clicked\" alert.\r\n\r\nActual result: Clicking anywhere brings up \"webview clicked\" alert only.\r\n Clicking on \"click me\" link does not bring up \"123456\" dialog.\r\n\r\n\r\n\r\n\r\n ", "attachment": [], "flagged": false, "summary": "iOS: Parity with Android Webview event handling", "creator": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "217222", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-31T13:21:27.000+0000", "updated": "2012-08-31T13:21:27.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }