Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7023] Android: HW window fires open and focus events in wrong order

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-02-29T13:30:52.000+0000
Affected Version/sn/a
Fix Version/sSprint 2012-05, Release 2.0.0
ComponentsAndroid
Labelsmodule_window, parity, qe-testadded
ReporterPing Wang
AssigneeHieu Pham
Created2012-01-06T15:16:32.000+0000
Updated2013-12-02T09:14:53.000+0000

Description

Run sample code below.
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#000000', 
    navBarHidden:true
});

win1.addEventListener("open", function(e) {
	Ti.API.debug("*****************OPENED");
});

win1.addEventListener("focus", function(e) {
	Ti.API.debug("****************FOCUSED");
});

win1.open();
In the log, we can find it fires focus first and then open. Expected Result: fire open first and then focus.

Comments

  1. Shawn Lipscomb 2012-02-29

    Any chance of merging this fix into 1.8.2, or is it too late?
  2. Neeraj Gupta 2012-02-29

    Too late. We are releasing 1.8.2 in next couple of hours.
  3. Dustin Hyde 2012-03-06

    Closing as Fixed. SDK: 2.0.0.v20120305174654 Android: V8 Studio: 2.0.0.201203051741 OS: Snow Leopard Devices Tested: Nexus One 2.2.2, Revolution 2.3.4, Xoom 3.2.1, Galaxy Nexus 4.0.2
  4. Shawn Lipscomb 2012-03-27

    Same problem exists in iOS, using SDK 2.0.0.v20120325213306.
  5. Neeraj Gupta 2012-03-27

    @Shawn - can you please file an iOS bug for this issue?
  6. Shawn Lipscomb 2012-03-27

  7. Neeraj Gupta 2012-03-27

    @Shawn - Thanks.
  8. Shawn Lipscomb 2012-04-05

    Update: this problem still exists under Android 3.2 (emulator).
  9. Shawn Lipscomb 2012-04-05

    Oops...never mind. Android 3.2 is fine. I switched emulators and didn't realize I had to clean the project.

JSON Source