[TIMOB-25983] Windows : Ti.UI.TextArea is not wrapped when there is long text, it just show in single line
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-09-27T09:27:58.000+0000 |
Affected Version/s | Release 7.1.0 |
Fix Version/s | Release 7.5.0 |
Components | Windows |
Labels | n/a |
Reporter | Aminul Islam |
Assignee | Kota Iguchi |
Created | 2018-04-23T17:54:17.000+0000 |
Updated | 2018-10-03T04:16:11.000+0000 |
Description
Hello !
Ti.UI.createTextArea is not wrapped when there is long text, it just show in single line in windows phone. But it wrapped in android.
Teste code :
Ti.UI.setBackgroundColor('white');
var controlsHeight = 38 * Ti.App.MultiplyFactor;
var win = Ti.UI.createWindow({
backgroundColor : 'white',
exitOnClose : true,
fullscreen : false
});
var textArea = Ti.UI.createTextArea({
width : Ti.UI.FILL,
backgroundColor : 'white',
color : 'black',
left : 40,
right : 40,
hintText : 'this is a long hint that is not wrapping in windows version. Not sure what is the problem. All text show in single line instead of multi line. please check'
});
textArea.value = 'this is a long hint that is not wrapping in windows version. Not sure what is the problem. All text show in single line instead of multi line. please check';
win.add(textArea);
win.open();
Test Environment:
Operating System
Name = Microsoft Windows 10 Pro
Version = 10.0.16299
Architecture = 32bit
# CPUs = 4
Memory = 17091956736
Node.js
Node.js Version = 8.9.1
npm Version = 5.5.1
Titanium CLI
CLI Version = 5.0.14
Titanium SDK
SDK Version = 7.1.0.GA
SDK Path = C:\ProgramData\Titanium\mobilesdk\win32\7.1.0.GA
Target Platform = windows
Please take a look on attached screenshot.
Attachments
File | Date | Size |
---|---|---|
image-1.png | 2018-04-23T17:53:48.000+0000 | 189851 |
Untitled.png | 2018-04-23T17:53:52.000+0000 | 786522 |
I am able to reproduce this even on Windows 10 desktop. This is happening because TextArea is not resized when there's is no
height
specified. In this case TextArea should assumeheight=Ti.UI.SIZE
specified (according to [UI Composite Layout Behavior Spec](https://docs.appcelerator.com/platform/latest/#!/guide/UI_Composite_Layout_Behavior_Spec-section-src-4196675_UICompositeLayoutBehaviorSpec-Autosizebehaviors)) but on Windows it does not resize its size. Started looking into it.https://github.com/appcelerator/titanium_mobile_windows/pull/1230
*FR Passed*
Re-opening, the sample code in the PR is not quite right because it only specifies
hintText
. We should take care ofvalue
property too.https://github.com/appcelerator/titanium_mobile_windows/pull/1284
FR passed.Waiting for CR and merge.