Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10136] Android: Postlayout event should not bubble up to parent

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-08-08T00:06:18.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sSprint 2012-15 Core, Release 3.0.0, 2013 Sprint 16, 2013 Sprint 16 API, Release 3.1.2, Release 3.2.0
ComponentsAndroid
Labelscore, layout, module_window, qe-3.1.2, qe-review, qe-testadded, regression
ReporterAllen Yeung
AssigneePing Wang
Created2012-07-25T13:38:33.000+0000
Updated2013-12-10T06:20:24.000+0000

Description

var win = Ti.UI.createWindow({
    backgroundColor: '#000',
    layout: 'vertical',
    navBarHidden: true
});
 
var view = Ti.UI.createView({
	width:200,
	height: 200
});
 
 win.add(view);
 view.addEventListener('postlayout', function(){
 	    Ti.API.info('View postlayout');

 });
win.addEventListener('postlayout', function(e) {
    Ti.API.info('Window postlayout');
});
 
win.open();
Expected: Each layout should be printed out two only. (The fact that it prints out twice instead of once is another bug) I/TiAPI (30816): View postlayout I/TiAPI (30816): Window postlayout I/TiAPI (30816): View postlayout I/TiAPI (30816): Window postlayout Actual: The window event gets printed out two additional times. I/TiAPI (30996): View postlayout I/TiAPI (30996): Window postlayout I/TiAPI (30996): Window postlayout I/TiAPI (30996): View postlayout I/TiAPI (30996): Window postlayout I/TiAPI (30996): Window postlayout

Comments

  1. Allen Yeung 2012-07-25

    PR Ready: https://github.com/appcelerator/titanium_mobile/pull/2640
  2. Vishal Duggal 2012-07-26

    Fixed by PR https://github.com/appcelerator/titanium_mobile/pull/2640 against master
  3. Tamila Smolich 2012-08-13

    Closing as fixed. Tested and verified on: Titanium Studio, build: 2.1.1.201208091713 Titanium SDK, build: 2.2.0.v20120810194112 Devices: Nexus 7 tab (4.1), HTC Evo (4.0.3)
  4. Anshu Mittal 2012-09-04

    Reopening to update labels
  5. Dhirendra Jha 2013-08-07

    This is a regression. This issue is not reproducible in SDK 3.1.1.GA build but its reproducible in latest 3.1.2.v20130806104555 build. verified in below environment - Appcelerator Studio: 3.1.2.201308021524 Titanium SDK: 3.1.2.v20130806104555 ACS: 1.0.5 Alloy: 1.2.0-alpha6 NPM: 1.3.2 Titanium: 3.1.2-alpha Titanium-code-processor: 1.0.2-alpha Android SDk Tools: 22.0.4 Device - Nexus7 (Android v4.2.1) Hence reopening this issue.
  6. Ping Wang 2013-08-07

    PR: https://github.com/appcelerator/titanium_mobile/pull/4556 For FR, please run the above test case, KS and Anvil(should be 370 passed / 36 failed).
  7. Ping Wang 2013-08-07

    3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4557
  8. Priya Agarwal 2013-08-08

    Verified with: Studio: 3.1.2.201308071912 SDK: 3.1.2.v20130807171139 acs:1.0.5 alloy:1.2.0-alpha6 titanium:3.1.2-alpha titanium-code-processor:1.0.2-alpha OS: OSX 10.8.4 Device: nexus 7(v4.3) Xcode:4.6.3 Closing as Fixed. PostLayout working as expected.
  9. Shameer Jan 2013-12-10

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4967

JSON Source