Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9904] iOS: Using Ti.UI.SIZE for a textArea truncates the text included in the text area

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-09-14T13:56:40.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sSprint 2012-15 Core, Release 2.1.3, Release 3.0.0, Sprint 2012-19 Core, 2012 Sprint 19
ComponentsiOS
LabelsSupportTeam, core, layout, module_textarea, qe-testadded
ReporterAnirudh Nagesh
AssigneeVishal Duggal
Created2012-07-06T14:34:43.000+0000
Updated2012-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

Comments

  1. Allen Hartwig 2012-08-08

    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!
  2. Vishal Duggal 2012-09-13

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/2937
  3. Satyam Sekhri 2012-09-17

    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)

JSON Source