{ "id": "100572", "key": "TIMOB-10803", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-06-26T22:11:58.000+0000", "created": "2012-09-06T14:29:15.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api", "supportTeam" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-08-24T20:54:02.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": "h4. MobileWeb - Ti.UI.Textfield text misaligned\r\nIn certain conditions when the fontSize and textfield height are both small, the text is sometimes not vertically aligned correctly\r\nand usually drifts downwards where the text goes past the bottom of the textfield and becomes hidden.\r\n\r\nThere are a few workarounds with one being manual and the other through a postlayout event.\r\n- The manual method involves typing in the textfield, clearing it, blurring it. The text should now be positioned correctly.\r\n- The postlayout event focuses and the blurs the textfield. The text should now be positioned correctly.\r\n\r\nAttached are images where it is incorrectly aligned and where it is correctly aligned.\r\n\r\nh4. Steps to reproduce:\r\n1. Copy the code below into a new project\r\n2. Run using mobileweb in chrome or internet explorer\r\n3. Note the text is not aligned correctly.\r\n4. workarounds below code\r\n\r\nh4. CODE:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white'\r\n});\r\nwin.open();\r\nvar view = Ti.UI.createView({\r\n\theight: 500,\r\n\twidth: 500\r\n});\r\nvar text = Ti.UI.createTextField({\r\n\thintText: 'Required',\r\n\tbackgroundColor: '#FFF',\r\n\twidth: 40,\r\n\theight: 12,\r\n\tfont: {\r\n\t\tfontSize: 7\r\n\t}\r\n});\r\nview.add(text);\r\n\r\n//This postlayout event is a workaround for the bug\r\n// text.addEventListener('postlayout', function() {\r\n\t// text.focus();\r\n\t// text.blur();\r\n// });\r\n\r\nwin.add(view);\r\n{code}\r\n\r\n\r\n\r\nh4. Workarounds\r\n\r\nMANUAL fix:\r\n1. Type in the textfield\r\n2. clear the textfield\r\n3. click on the URL bar to blur the textfield\r\n4. The text should be in the correct position\r\n\r\nPOSTLAYOUT fix:\r\n1. uncomment the eventlistener section in the code above\r\n2. Run using mobileweb or internet explorer\r\n3. Note the text is now aligned correctly.", "attachment": [ { "id": "31047", "filename": "aligned.png", "author": { "name": "amiller", "key": "amiller", "displayName": "Alexander Miller", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-06T14:29:15.000+0000", "size": 6992, "mimeType": "image/png" }, { "id": "31046", "filename": "misaligned.png", "author": { "name": "amiller", "key": "amiller", "displayName": "Alexander Miller", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-06T14:29:15.000+0000", "size": 6721, "mimeType": "image/png" } ], "flagged": false, "summary": "MobileWeb: Textfield has misaligned text", "creator": { "name": "amiller", "key": "amiller", "displayName": "Alexander Miller", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "amiller", "key": "amiller", "displayName": "Alexander Miller", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Internet Explorer Version 9.0.8112.16421,\r\nGoogle Chrome Version 21.0.1180.79,\r\nTi SDK 2.2.0.v201208231517122", "comment": { "comments": [ { "id": "427211", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Mobile Web has been deprecated and will be removed in fixVersion 7.0.0.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-08-24T20:54:02.000+0000", "updated": "2017-08-24T20:54:02.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }