Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Window 'close' event fires three times in a row!

Here is the example code:
http://gist.github.com/603078

The event listener fires three times in a row.
And each time event properties are the same.

Tested on Android 2.2 and Ti SDK 1.4 (also 1.4.2 from continuous builds).

— asked September 29th 2010 by Vitaly Kravchenko
  • android
  • close
  • event
  • window
1 Comment
  • Same problem here, but on Ti SDK 1.5.1 - any news on this? begins to grow really old..

    — commented January 21st 2011 by Vebjørn Berg

3 Answers

  • Have you checked the event type to see what the messages may be?

    win.addEventListener('close', function(e) {
        Ti.API.info('addNoteWindow closed ' + e.type);
    });
    

    In my quick test on an iPhone I got a type of 'close' you may be seeing others but perhaps you can choose to perform your action on just one of the types. Just a thought.

    — answered September 29th 2010 by John McKnight
    permalink
    0 Comments
  • Known issue Ticket 1827 put a watch on the ticket to know when it's fixed.

    — answered September 29th 2010 by Don Thorp
    permalink
    0 Comments
  • Thanks.

    — answered September 29th 2010 by Vitaly Kravchenko
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.