[TIMOB-11669] iOS: Label - postlayout events fired twice for labels.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-26T08:33:46.000+0000 |
Affected Version/s | Release 2.1.4 |
Fix Version/s | 2013 Sprint 07 |
Components | iOS |
Labels | parity, qe-ios214 |
Reporter | Olga Romero |
Assignee | Shameer Jan |
Created | 2012-11-05T21:33:48.000+0000 |
Updated | 2014-06-19T12:44:22.000+0000 |
Description
While testing Labels I noticed that console fires events twice.
*not a regression* occurs on 2.1.3
It also appears in 3.0.0
Test steps:
1.Run this code below:
var win = Ti.UI.createWindow({
backgroundColor : '#FFF',
layout : 'vertical'
});
var label = Ti.UI.createLabel({
text : "hello",
left : 0,
width : Ti.UI.SIZE,
height : Ti.UI.SIZE
});
label.addEventListener("postlayout", function(e) {
Ti.API.info("label postlayout");
//alert("label post layout");
});
var doBtn = Ti.UI.createButton({
title : "do",
width : Ti.UI.SIZE,
height : Ti.UI.SIZE
});
doBtn.addEventListener("click", function() {
label.text = "new text";
label.backgroundColor = '#F00';
label.left += 20;
});
win.add(doBtn);
win.add(label);
win.open();
2. Press buttons in order
3. Check console
Actual result:
3.See an attachment.
Expected result:
See an attachment.
Attachments
File | Date | Size |
---|---|---|
eventsX2.txt | 2012-11-05T21:33:48.000+0000 | 1511 |
expected.txt | 2012-11-05T21:33:48.000+0000 | 539 |
Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
Tested with: Titanium Studio, build: 3.1.0.201303230404 Titanium SDK, build: 3.1.0.v20130325155928 Devices: iPhone5 iOS 6.1.3 iPad mini iOS 6.0 "label postlayout" fired once
Tested with: SDK: 3.1.0.v20130409124549 Studio:3.1.0.201304011603 Device: iPad2(v 5.1) OS: OSX 10.7.5 "label postlayout' fires once.