{ "id": "92283", "key": "TIMOB-9224", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-09T16:50:55.000+0000", "created": "2012-05-24T08:12:18.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "parity" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-09T16:50:55.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "h2. Problem\r\n\r\nThe getText method of [Titanium.UI.Clipboard|http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.Clipboard] returns different values on Android and iOS when the clipboard is empty:\r\n\r\nAndroid: empty string\r\niOS: undefined\r\n\r\n\r\nh2. Test case\r\n\r\n{code:lang=javascript|title=app.js}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nTi.API.log('Deleting all text in Clipboard');\r\nTi.UI.Clipboard.clearText();\r\nTi.API.log('Clipboard.getText() empty: ' + Ti.UI.Clipboard.getText()); // returns empty string on android and undefined on iOS when empty\r\nTi.API.log('Set text Clipboard to hello');\r\nTi.UI.Clipboard.setText('hello');\r\nTi.API.log('Clipboard.hasText(), should be true: ' + Ti.UI.Clipboard.hasText());\r\nTi.API.log('Clipboard.getText(), should be hello: ' + Ti.UI.Clipboard.getText());\r\nTi.API.log('Deleting all text in Clipboard');\r\nTi.UI.Clipboard.clearText();\r\nTi.API.log('Clipboard.getText() empty: ' + Ti.UI.Clipboard.getText()); // returns empty string on android and undefined on iOS when empty\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Ti API: UI.Clipboard getText returns different values per platform when clipboard empty", "creator": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium 2.0.1 GA2\r\n* iOS 5.0 / Android APIs 2.2\r\n* Simulator / Emulator\r\n", "comment": { "comments": [ { "id": "421637", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed, any problems please open a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-09T16:50:55.000+0000", "updated": "2017-06-09T16:50:55.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }