[TIMOB-10847] iOS: Setting .text on label Ti.UI.Label when .right is set causes jumping
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 2.1.2, Release 3.1.0 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | api, community |
| Reporter | Sindre Sorhus |
| Assignee | Unknown |
| Created | 2012-08-29T05:12:15.000+0000 |
| Updated | 2018-02-28T20:03:15.000+0000 |
Description
Problem
When setting .text on a Ti.UI.Label component when the .right prop is set to something, like eg. 50, the new text jumps while rendering. I grabbed some screenshot of it happening (attached). First from setting a new text and then back to the old one. Notice how it jumps both ways.Expected Behavior
The text should be set without any jump.Test case
Ti.UI.backgroundColor = '#fff';
var win = Ti.UI.createWindow();
var label = Ti.UI.createLabel({
right: 50
});
win.add( label );
win.open();
var t = true;
setInterval(function() {
label.text = t ? 'string 1' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
t = !t;
}, 2000);
Attachments
| File | Date | Size |
|---|---|---|
| 1.png | 2012-08-29T05:12:15.000+0000 | 27957 |
| 2.png | 2012-08-29T05:12:15.000+0000 | 25910 |
| 3.png | 2012-08-29T05:12:15.000+0000 | 51593 |
| 4.png | 2012-08-29T05:12:15.000+0000 | 27236 |
| 5.png | 2012-08-29T05:12:15.000+0000 | 27110 |
Any chance to get this fixed? Too be honest, I'm getting a little tired of this dance. I open a valid comprehensive bug report, you never fix...
Sindre, thank you for following up and for the bug report. I will bring this bug up for discussion to see when we can get it resolved.
bump
issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0