{ "id": "77601", "key": "TIMOB-4630", "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": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-10-03T21:07:28.000+0000", "created": "2011-07-08T01:09:51.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "tbs-1.9.0" ], "versions": [ { "id": "11367", "description": "", "name": "Release 1.7.1", "archived": true, "released": true, "releaseDate": "2011-06-21" } ], "issuelinks": [ { "id": "14456", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "84266", "key": "TIMOB-6873", "fields": { "summary": "Android: Inconsistent Focus and Blur events with Textfield in TableViewRow", "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 } } } }, { "id": "14455", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "84520", "key": "TIDOC-113", "fields": { "summary": "APIDoc: document textField/Area differences in click, touch, touchFocus between platforms", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-05-30T11:01:12.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": "Hi.\r\n\r\nI've noticed a bug with \"click\" event attached to the text field. It seems that \"click\" event is triggered after text field has gained focus (so, \"click\" event is triggered after second click). \r\n\r\nCode that demonstrate the bug:\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n modal: true\r\n});\r\n \r\nvar tf = Ti.UI.createTextField({\r\n editable: false,\r\n width: 200\r\n});\r\n \r\ntf.addEventListener('click', function() {\r\n Ti.alert('Tf clicked!');\r\n});\r\n \r\ntf.addEventListener('focus', function() {\r\n Ti.alert('Tf focused!');\r\n});\r\n \r\nwin.add(tf);\r\n \r\nwin.open();\r\n{code} \r\n\r\n\r\nQ/A topics:\r\n\r\nhttp://developer.appcelerator.com/question/122008/android-text-field-click-event\r\nhttp://developer.appcelerator.com/question/122206/double-click-textfield-in-tableview-to-fire-click-event\r\n\r\n\r\nIf you need more info, please let me know.", "attachment": [], "flagged": false, "summary": "Android: UI.TextField - click event not fired first time", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Titanium mobile SDK 1.7.1, Windows XP, Android 2.2 (Samsung Galaxy Tab)", "comment": { "comments": [ { "id": "158998", "author": { "name": "alamador", "key": "alamador", "displayName": "Ryan Needham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Just to add a little, I have seen the same issue in SDK versions 1.6.2 and 1.7.1 in both the android 2.2 and 2.3 emulators. I've also run into the same problem with the application installed on a nook color running 2.2 but oddly enough the click event seems to fire as expected when installed on a DroidX also running 2.2", "updateAuthor": { "name": "alamador", "key": "alamador", "displayName": "Ryan Needham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-08T07:03:31.000+0000", "updated": "2011-07-08T07:04:58.000+0000" }, { "id": "159108", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "This may be an issue of interpretation of what is \"expected\" on the part of the user. If I understand correctly, the observation is that the first click of a textfield generates a focus rather than a click, which seems logical and reasonable to me. Still, I will leave it to the core team to decide. ", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-07-09T04:49:05.000+0000", "updated": "2011-07-09T04:49:05.000+0000" }, { "id": "159109", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Ivan, please provide the Titanium SDK build date and hash. Also, does this problem occur in an emulator as well as a physical device?", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-07-09T04:50:24.000+0000", "updated": "2011-07-09T04:50:24.000+0000" }, { "id": "160955", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Hi Paul.\r\n\r\n\r\nSorry for delay, I couldn't comment on this ticket before. Here is SDK build date and hash\r\n\r\nTitanium SDK version: 1.7.1 (06/21/11 14:28 1293a6d)\r\n\r\nand I work on real device (Samsung Galaxy Tab v7).\r\n\r\n", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2011-07-28T00:08:32.000+0000", "updated": "2011-07-28T00:08:32.000+0000" }, { "id": "171462", "author": { "name": "stevelacey", "key": "stevelacey", "displayName": "Steve Lacey", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is this not being looked into further? Is there a workaround? I'm stilling experiencing this issue, on emulator and devices, some devices can't focus the fields at all.", "updateAuthor": { "name": "stevelacey", "key": "stevelacey", "displayName": "Steve Lacey", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-04T06:49:04.000+0000", "updated": "2011-11-04T06:49:04.000+0000" }, { "id": "171465", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Android OS is different than iOS in that it has two focus types. Focus and touch focus. The first touch changes focus, it's not a 'click'. Click occurs when the field is clicked either by the dpad, enter key, or touched again after it has focus.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-04T07:47:21.000+0000", "updated": "2011-11-04T07:47:21.000+0000" }, { "id": "171723", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "@Steve - you could try to attach \"focus\" event listener in which you can fire \"click\" event (or just use \"focus\" event instead of \"click\" event). Although, I have to say that when I tried that workaround, \"focus\" event sometimes got fired without click/touch/whatever when scrolling in scroll view (I didn't try to isolate the issue yet). But this is not ideal solution as I mentioned bellow (despite potential bug), but I can't think of any other workaround.\r\n\r\n\r\n@Don - can we have functionality that \"click\" event gets fired on first time UI component gets clicked/touched? Although, cross-platform consistency seems justified reason for doing that, I would like to point out that many users (coming from DOM environment) find this behavior unintuitive and misleading (in Q/A links, there is example of this kind of behavior in DOM environment). Also, focus can be gained without clicking/touching the UI component, for example by pressing \"Next\" keyboard key when there are multiple text fields present, so relying on \"focus\" event to do some first-time-\"click\" functionality (when user first time clicks/touches the UI component) is not good practice. I can't think of any solution to do first-time-\"click\" functionality that would work as expected.\r\nOr, if you don't find my reasons valid, this behavior should at least be mentioned in the docs.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2011-11-07T03:44:14.000+0000", "updated": "2011-11-07T03:44:14.000+0000" }, { "id": "176462", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Just to add that as a workaround, TextField's \"focusable\" property can be set to \"false\", that way TextField won't fire \"focus\" event, but at least will fire \"click\" event first time user touches it. Maybe it's not workaround for all situations, but it help me accomplish what I wanted.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2011-12-19T06:47:14.000+0000", "updated": "2011-12-19T06:47:14.000+0000" }, { "id": "178832", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Just to add Q/A topic about this issue in cross-platform context: http://developer.appcelerator.com/question/130158/text-field-weirdness-on-ios-simulator-and-differences-to-android-implementation\r\n\r\n\r\n\r\nIgnore drama at the end, it has some, IMHO, good technical insights.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-01-11T04:09:45.000+0000", "updated": "2012-01-11T04:09:45.000+0000" }, { "id": "221074", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can't reproduce with latest fixes for Android tableview -- TIMOB-12038, TIMOB-6732, and TIMOB-10712.\nNote that the pull requests for TIMOB-6732 and TIMOB-10712 are stil pending at this time.", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T20:00:46.000+0000", "updated": "2012-09-26T20:00:46.000+0000" }, { "id": "221967", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tested with latest 3.0.X SDK. The \"focus\" event is fired when the app starts\nwithout any click. Then a click fires a click event. So I cannot reproduce this\nissue.", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-03T21:05:57.000+0000", "updated": "2012-10-03T21:05:57.000+0000" }, { "id": "222825", "author": { "name": "doublerebel", "key": "doublerebel", "displayName": "Charles Phillips", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I am still experiencing this issue with current 3.0.X SDK, and multiple Android versions. In my situation, the TextField is not automatically focused when the app is open (as it is not the only element which can have focus). The click event does not fire until after it has focus.", "updateAuthor": { "name": "doublerebel", "key": "doublerebel", "displayName": "Charles Phillips", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-09T23:55:10.000+0000", "updated": "2012-10-09T23:55:10.000+0000" }, { "id": "416492", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as I am unable to reproduce the issue using the following environment; \r\nPixel (7.1) \r\nMacOS 10.11.6 (15G31) \r\nStudio 4.8.1.201612050850 \r\nTi SDK 6.0.3 GA \r\nAppc NPM 4.2.8 \r\nAppc CLI 6.1.0 \r\nTi CLI 5.0.11 \r\nAlloy 1.9.5 \r\nArrow 1.10.1 \r\nXcode 8.2 (8C38) \r\nNode v4.6.0 \r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-31T17:12:42.000+0000", "updated": "2017-03-31T17:12:42.000+0000" }, { "id": "438015", "author": { "name": "ezefire@gmail.com", "key": "ezefire@gmail.com", "displayName": "ezefire@gmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have reproduced this situation but it is the default behavior on Android", "updateAuthor": { "name": "ezefire@gmail.com", "key": "ezefire@gmail.com", "displayName": "ezefire@gmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-30T11:01:12.000+0000", "updated": "2018-05-30T11:01:12.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }