Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7229] iOS: UI.Window - open and focus events not fired when open method before eventlisteners

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-01-16T16:50:44.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterPaul Dowsett
AssigneeNeeraj Gupta
Created2012-01-16T15:09:26.000+0000
Updated2017-03-09T23:20:12.000+0000

Description

Problem

Neither window open or focus events are fired. Note that both work on Android, albeit with bugs (that can be worked around). See linked ticket, and its linked tickets.

Test case

var win = Ti.UI.createWindow({
  backgroundColor:'red'
});
win.open();

win.addEventListener('open', function() {
Ti.API.info('------- Window open event fired ------');
});

win.addEventListener('focus', function() {
Ti.API.info('------- Window focus event fired ------');
});

Logs

Nothing output to the logs.

Comments

  1. Paul Dowsett 2012-01-16

    open and focus eventlisteners should go before the open method. I will raise an apidoc ticket to convey this advice. Hence, closing as invalid
  2. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source