[TIMOB-9904] iOS: Using Ti.UI.SIZE for a textArea truncates the text included in the text area
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-14T13:56:40.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | Sprint 2012-15 Core, Release 2.1.3, Release 3.0.0, Sprint 2012-19 Core, 2012 Sprint 19 |
Components | iOS |
Labels | SupportTeam, core, layout, module_textarea, qe-testadded |
Reporter | Anirudh Nagesh |
Assignee | Vishal Duggal |
Created | 2012-07-06T14:34:43.000+0000 |
Updated | 2012-10-26T21:00:28.000+0000 |
Description
1. Run the below code in app.js to see the text getting truncated in the text area.
App.js
var _window = Ti.UI.createWindow({
backgroundColor:'#fff'
});
var txt = Ti.UI.createTextArea({
text: "Test",
backgroundColor: 'transparent',
top: 100,
left: 18,
bottom: 20,
right: 10,
font: {fontSize: 15},
autoLink: Ti.UI.iOS.AUTODETECT_LINK,
height: Ti.UI.SIZE,
width: Ti.UI.FILL,
scrollable:'false'
});
_window.add(txt);
_window.open();
This works fine on Android.
Workaround is to calculate the height of the text area using postLayout event as listed here.
http://pastie.org/4212176
This is not properly resolved. The height varies depending on
value
length; shorter values increasingly too tall. [Code to reproduce](http://pastie.org/4414168) !http://s9.postimage.org/voy5obs1r/i_OS_Simulator_Screen_shot_Aug_8_2012_2_10_15_PM.png!Pull pending https://github.com/appcelerator/titanium_mobile/pull/2937
Verified on: Titanium Studio: 2.1.2.201208301612 Titanium SDK: 2.1.3.v20120915120319, 3.0.0.v20120915105712 Device: iOS Simulator, iPad 2(v5.1)