{ "id": "87565", "key": "TIMOB-7928", "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": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13170", "name": "Sprint 2012-06", "archived": true, "released": true, "releaseDate": "2012-03-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-13T17:13:48.000+0000", "created": "2012-03-08T11:03:55.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-port" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [], "assignee": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-09T14:28:43.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "h3. Expected results\r\n\r\nClicking the label should display the alert. Using the {{singletap}} event should also work.\r\n\r\nh3. Actual results\r\n\r\nWorks in iOS/Android, no alert displayed in Mobile Web. Code works with {{singletap}} in native also, but not MW.\r\n\r\n\r\n{code}\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'Mobile Web Rocks!',\r\n\tfont:{fontSize:20,fontFamily:'sans-serif'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\nlabel1.addEventListener('click', function() {\r\n\talert('label was clicked');\r\n});\r\n\r\nwin1.add(label1);\r\n{code}", "attachment": [ { "id": "26143", "filename": "app.js", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-12T14:15:52.000+0000", "size": 1242, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "MobileWeb: label doesn't support click or singletap event", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": "SDK build 2.0.0.v20120308103238\r\nOS X, Studio Titanium Studio, build: 1.0.10.201202241328\r\nChrome 17.0.963.56, Safari 5.1.2", "comment": { "comments": [ { "id": "185552", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is the expected behavior. The same thing happens on iOS last time I checked. The \"touchEnabled\" property controls whether or not a control receives touch events, and it defaults to false in labels. Set it to true to receive events.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-08T11:07:51.000+0000", "updated": "2012-03-08T11:08:15.000+0000" }, { "id": "185553", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I stand corrected. It looks like the behavior was changed in iOS and we weren't informed of this change.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-08T11:18:14.000+0000", "updated": "2012-03-08T11:18:14.000+0000" }, { "id": "185558", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "OK, that would have surprised me if required. I've never heard of that requirement on iOS or Android and have added touch events to labels quite frequently (demos during training a lot). I can confirm that setting touchEnabled=true works. So it looks like you just have to flip the default.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2012-03-08T11:34:14.000+0000", "updated": "2012-03-08T11:34:14.000+0000" }, { "id": "186073", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull Request: https://github.com/appcelerator/titanium_mobile/pull/1644", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-12T14:16:13.000+0000", "updated": "2012-03-12T14:16:13.000+0000" }, { "id": "213648", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Tested On:\r\nTitanium studio : 2.1.1.201207271312\r\nSDK version : 2.2.0.v20120809014911\r\nAndroid 4.0.4 - default ,chrome 18.0\r\nIphone 4.3.5 - safari mobile\r\nMountain lion(10.8) - chrome 21.0,safari 6,firefox 14.0.1", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-09T14:28:30.000+0000", "updated": "2012-08-09T14:28:30.000+0000" }, { "id": "213649", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Tested On:\r\nTitanium studio : 2.1.1.201207271312\r\nSDK version : 2.2.0.v20120809014911\r\nAndroid 4.0.4 - default ,chrome 18.0\r\nIphone 4.3.5 - safari mobile\r\nMountain lion(10.8) - chrome 21.0,safari 6,firefox 14.0.1", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-09T14:28:43.000+0000", "updated": "2012-08-09T14:28:43.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }