Problem
Scenario: A fixed-sized Label and a Ti.UI.FILL-width TextArea in a horizontal layout.
Bug: When the content of the TextField exceeds the width of the TextField by a certain amount, the TextField element is wrapped to the next line, instead of staying in place. This occurs both in the iPhone simulator via Titanium Studio and on my iPhone.
Test case
var win = Ti.UI.createWindow({
layout: 'horizontal'
});
win.add(Ti.UI.createLabel({
width: 120,
text: 'Enter text:',
textAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT,
backgroundColor: '#ddd'
}));
win.add(Ti.UI.createTextField({
//BUG TextField stretches and repositions with long content
width: Ti.UI.FILL,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
}));
win.open();
Tested and confirmed iOS 5.1, TiSDK 2.1.2 GA, 2.1.4 GA, 3.0.0 CI.
Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) iOS iPhone Simulator: iOS SDK version: 6.0
I have been able to reproduce this issue with the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.9.0.201705021158 Ti SDK 6.1.0.v20170519131839 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.7.0_80