{ "id": "118950", "key": "TIMOB-14940", "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": "15707", "description": "2013 Sprint 23", "name": "2013 Sprint 23", "archived": true, "released": true, "releaseDate": "2013-11-15" }, { "id": "15708", "description": "2013 Sprint 23 API", "name": "2013 Sprint 23 API", "archived": true, "released": true, "releaseDate": "2013-11-15" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-11-07T23:51:14.000+0000", "created": "2013-08-23T06:50:35.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Android", "qe-testadded", "triage" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [ { "id": "33975", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "119790", "key": "AC-2422", "fields": { "summary": "Android: backgroundSelectedColor and backgroundSelectedImage occasionally \"stuck\"", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-02-19T11:19: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor:'green',\r\n width:'100%',\r\n height:'100%',\r\n // fullscreen : true,\r\n // navBarHidden : true\r\n });\r\n \r\n var view = Ti.UI.createView({\r\n width:'20%',\r\n height:'20%',\r\n backgroundColor:'red'\r\n });\r\n view.addEventListener('touchstart',function(){\r\n view.backgroundColor = 'white'\r\n });\r\n view.addEventListener('touchend',function(){\r\n view.backgroundColor = 'red'\r\n });\r\n win.add(view);\r\n win.open();\r\n{code}\r\n\r\nstep 1 : Run the above code\r\nstep 2 : tap on the red view\r\nstep 3 : without removing the finger tap on the green window or in the white view again\r\nstep 4: remove both fingers\r\n\r\nActual result\r\n\r\nThe view remains white\r\n\r\nexpected result\r\n\r\nThe view should turn red", "attachment": [], "flagged": false, "summary": "Android: touchend event not fired if two touches occured", "creator": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK version: 3.1.1 \r\nTitanium Studio, build: 3.0.1.201212181159\r\nAndroid 4.0.4", "comment": { "comments": [ { "id": "270745", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "1. It also reproduces on 3.1.3RC\r\n2. Here's another way to cause the bug: tap inside the view to trigger touchstart, then tap quickly outside the view (even if you do lift the finger, doesn't matter) - the touchend doesn't fire.\r\n3. The same bug occurs even without event listeners - just define backgroundColor and backgroundSelectedColor, and on occasion the backgroundSelectedColor is stuck.\r\n4. This bug is extremely annoying! On small clickable elements, when the user is apt to often click on the element boundary, it appears to happen quite a lot in normal usage patterns.", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-09-11T13:34:07.000+0000", "updated": "2013-09-11T13:40:26.000+0000" }, { "id": "271701", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Also happens with backgroundSelectedImage. Frankly I'm surprised this is pushed out to 3.2.0 - it's a pretty serious issue, giving the user wrong indications regarding key events such as button clicks.", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-09-18T08:35:33.000+0000", "updated": "2013-09-18T08:35:33.000+0000" }, { "id": "271751", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mokesmokes] I agree it needs to be fixed, but we can only take on so many issues at once. We always welcome pull requests against titanium_mobile to help speed up the process.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-18T15:42:30.000+0000", "updated": "2013-09-18T15:42:30.000+0000" }, { "id": "271757", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Ingo, I hear you loud and clear..... and with iOS7 release you guys have more than a handful. However, for Android this is a big UI issue, I'm hoping it can be fixed and merged into 3.1.x even if not in an official release. I'm in complete agreement on the PRs, I have submitted several already, not sure though that I will be able to dig into this one soon. Thanks!", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-09-18T16:21:53.000+0000", "updated": "2013-09-18T16:21:53.000+0000" }, { "id": "271944", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "OK - here's the source of the bug: the touch listener in TiUIView.java gets confused when there are secondary touches after the initial touch start. Here is the simplest example I logged: 0 (ACTION_DOWN), 261 (ACTION_POINTER_2_DOWN), 6 (ACTION_POINTER_1_UP), 1 (ACTION_UP)\r\ntouchstart is fired after ACTION_DOWN, touchend is never fired and of course the backgroundSelectedColor/Image is stuck.\r\nFrankly, I don't understand the implemented logic with the secondary touches in this function, but somehow you're losing the end event. It would be great if someone familiar with this code took care of this, since accidental, secondary touches happen frequently, and the UI just goes bonkers with this bug. Thanks!", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-09-19T17:55:46.000+0000", "updated": "2013-09-19T17:55:46.000+0000" }, { "id": "271956", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Additionally, the logic in that function also triggers the 'twofingertap' event on the view - even though only one of the touches was inside the view....", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-09-19T18:26:23.000+0000", "updated": "2013-09-19T18:26:23.000+0000" }, { "id": "271966", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-09-19T18:41:27.000+0000", "updated": "2013-09-19T18:41:27.000+0000" }, { "id": "271998", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "(Attempted workaround deleted)", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-09-19T21:07:28.000+0000", "updated": "2013-09-19T21:22:58.000+0000" }, { "id": "272082", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Pull request submitted: https://github.com/appcelerator/titanium_mobile/pull/4720\r\nDescription: In Android there are frequent cases when the touchend event is not sent, when the background colors and images are not responding correctly to touches, etc. The root of this issue is the additional handling for (the rarely used) pinch and twofingertap events. (BTW - in the docs pinch is defined for iOS only..... but the Android code apparently supports it, untested by me). This PR skips the handling for pinch and twofingertap if there are no listeners or these events, and thus restoring correct behavior for the rest of the touch events. Item of note: it's not clear how twofingertap is supposed to interact with backgroundSelectedColor/Image, and touchend (all these seem to not function with twofingertap, both before and after this PR).", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-09-20T06:50:24.000+0000", "updated": "2013-09-20T06:50:24.000+0000" }, { "id": "275496", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Does this really need to be pushed out to 3.3.0? The PR I submitted works and is in production in my app, for about a month now without a glitch. Touches were much less reliable before my fix.", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-10-17T20:37:51.000+0000", "updated": "2013-10-17T20:37:51.000+0000" }, { "id": "275499", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'll try and pull it back. We're just way overloaded.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-17T20:41:28.000+0000", "updated": "2013-10-17T20:41:28.000+0000" }, { "id": "278232", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Another test case for the \"twofingertap\" event. For FR, run the code, and touch the screen with one finger inside the red view and on finger inside the green view. It should not fire \"twofingertap\" event.\n{code}\nvar win = Ti.UI.createWindow({\n backgroundColor:'green',\n width:'100%',\n height:'100%',\n // fullscreen : true,\n // navBarHidden : true\n });\n \n var view = Ti.UI.createView({\n width:'20%',\n height:'20%',\n backgroundColor:'red'\n });\n view.addEventListener('touchstart',function(){\n view.backgroundColor = 'white'\n });\n view.addEventListener('touchend',function(){\n view.backgroundColor = 'red'\n });\n view.addEventListener('twofingertap', function(){\n \tTi.API.info(\"*************** twofingertap\");\n });\n win.add(view);\n win.open();\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-05T19:45:53.000+0000", "updated": "2013-11-05T19:45:53.000+0000" }, { "id": "278234", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi [~mokesmokes], I left comment on your PR. Due to the tight schedule for the release, can you take a look and let me know if you have time to update it ASAP? Thanks.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-05T19:48:03.000+0000", "updated": "2013-11-05T19:51:58.000+0000" }, { "id": "278249", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Hi, I also commented on the PR. Unfortunately I don't have time to make additional updates on the PR. Having said that, if your team doesn't have the time either - my PR is definitely better than the existing situation, where simple click handlers, background image changes, etc don't work as expected in many cases.", "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-11-05T21:05:26.000+0000", "updated": "2013-11-05T21:05:26.000+0000" }, { "id": "278282", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4917\nFor FR, please run the above two test cases, and TIMOB-768 and KS->BASE UI->Window Events.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-05T22:26:04.000+0000", "updated": "2013-11-05T22:26:04.000+0000" }, { "id": "278739", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "CR + FR", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-07T23:51:14.000+0000", "updated": "2013-11-07T23:51:14.000+0000" }, { "id": "279084", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Touchend event is getting fired when two touches occurred.\r\n\r\nUsing Environment:\r\nAppcelerator Studio, build: 3.2.0.201311112306\r\nSDK:3.2.0.v20131111174605\r\nalloy: 1.3.0\r\nCLI : 3.2.0\r\nXcode:5.0.1\r\nDevice: Google nexus 7(v4.3),Samsung Note(v2.3.6)\r\nOS: Mac OSX 10.9", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-11-12T08:38:55.000+0000", "updated": "2013-11-12T08:38:55.000+0000" }, { "id": "280184", "author": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "updateAuthor": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2013-11-19T17:15:35.000+0000", "updated": "2013-11-19T17:15:35.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }