[TIMOB-23305] Windows: Ti.UI.Label width is not updated when setting new text
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-05-28T04:41:33.000+0000 |
Affected Version/s | Release 5.3.0 |
Fix Version/s | Release 5.4.0 |
Components | Windows |
Labels | qe-5.4.0 |
Reporter | Jonas Bjurhult |
Assignee | Kota Iguchi |
Created | 2016-05-03T08:29:20.000+0000 |
Updated | 2016-06-28T18:02:18.000+0000 |
Description
SDK 5.4.0.v20160426000033
Test code:
index.xml
<Alloy>
<Window class="container">
<Label id="label" top="0" onClick="doClick">THIS IS A SHORT LABEL</Label>
</Window>
</Alloy>
index.tss
".container": {
backgroundColor:"white"
}
"#label": {
width: Ti.UI.SIZE,
color: "#000"
}
index.js
function doClick(e) {
$.label.text = "THIS IS A LONGER LABEL!!!!!!!"
}
$.index.open();
When clicking the label you can see that the label is divided into 2 rows with a newline. Expected behaviour based on Android/iOS is that the label width is recalculated to fit the new text.
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2016-05-03 at 10.43.18.png | 2016-05-03T08:44:12.000+0000 | 12257 |
Screen Shot 2016-05-03 at 10.43.27.png | 2016-05-03T08:44:16.000+0000 | 13845 |
Hello, I am able to reproduce this issue with given code and given step on Windows Phone. However on Android the behavior is as expected. *Steps:* 1. Create a default alloy project for Windows with given code. 2. Build and run the app on Windows Phone Device. 3. Click the label. >> Label text is changed. 4. It is apparent that the label width is not updated for new text. [Screenshot| https://i.imgsafe.org/fc30c90.png] Thanks *Environment*: *OS :Microsoft Windows 8.1 Enterprise N *Device info:* Microsoft Lumia 640 (Windows Phone 8.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.4.0.v20160429102159 *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
https://github.com/appcelerator/titanium_mobile_windows/pull/714
Verified as fixed. Tested on: Microsoft Lumia 640 (8.1) Windows Simulator (8.1) Microsoft Lumia 640 (10) Windows Simulator (10) Windows 10 Pro Studio: 4.7.0.201606150733 Ti SDK: 5.4.0.v20160627224205 Appc NPM: 4.2.7-2 App CLI: 5.4.0-20 Node v4.4.4 *Closing Ticket.*