Project: titanium
Issue TIMOB-19119: Windows: Components resize after their width or height has been calculated from left and right or top and bottom
Components such as {{TextField}} get resized by Windows after loading. This resets the {{width}} or {{height}} properties if they have been calculated from the {{top, bottom}} or {{left, right}} properties. {code} var win = Ti.UI.createWindow({ backgroundColor: 'blue' }); var viewA = Ti.UI.createTextField({ hintText: 'SOME TEXT', top: '5dp', left: '10dp', // removing this line should allow the TextField to scale according to its contents // retaining this line should scale the TextField to the same size as the red view below right: '10dp', height: '40dp' }); var viewB = Ti.UI.createView({ backgroundColor: 'red', top: '60dp', left: '10dp', right: '10dp', height: '40dp' }); win.add(viewA); win.add(viewB); win.open(); {code}
Story points: 8