Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17832] iOS: Window.toolbar -- text field shifts to the right upon text entry

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.4.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterTim Poulsen
AssigneeUnknown
Created2014-10-09T15:36:37.000+0000
Updated2018-02-28T20:03:53.000+0000

Description

If you include a text field in a window.toolbar control, when the user types text into that field, the field enlarges and shifts to the right. It should not. I found this while implementing ALOY-1089. However, the following classic code demonstrates the same issue.
var send = Titanium.UI.createButton({
    title: 'Send',
    style: Titanium.UI.iPhone.SystemButtonStyle.DONE,
});

var cancel = Titanium.UI.createButton({
    systemButton: Titanium.UI.iPhone.SystemButton.CANCEL
});

var textField = Ti.UI.createTextField({
    borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
    width: 150
});

flexSpace = Titanium.UI.createButton({
    systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});

var toolbar = Titanium.UI.iOS.createToolbar({
    items:[flexSpace, textField, flexSpace, send, flexSpace, cancel, flexSpace],
    bottom:0,
    borderTop:true,
    borderBottom:false
}); 

var win = Ti.UI.createWindow({
   backgroundColor:'red',
   toolbar: toolbar
});
win.open();

Comments

No comments

JSON Source