Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-282] Can't close a new window when created from a menu item

GitHub Issuen/a
Resolution Date2012-07-16T17:04:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
Labels0.8.0, android, scrub-invalid
ReporterDav Glass
AssigneeNeeraj Gupta


If you create a window from a button click listener, then call Titanium.UI.currentWindow.close() from the opened window it will work.

But if you create a window from an menu.addItem call (and the win object is scoped to the callback with a "var") you can't close the window.

Sample files attached here:

index.html shows the bug
test.html new window opened by index.html
works.html shows moving the win out of the callback scope makes it work.

Not sure if it's a "real" bug or an implementation detail, but I wanted to report it.


  1. Don Thorp 2011-04-15

    Are there any errors in the trace level log? Most of the java errors go there.

  2. Dav Glass 2011-04-15

    I don't see a Java error, but from JS Titanium.UI.currentWindow is undefined

  3. Matthew Apperson 2011-12-05

    Not valid, does not reproduce in TiMOB SDK 1.7.5 as we no longer use HTML for our markup language
  4. Josh Roesslein 2012-07-16

    No longer applicable since this was a bug in the "old" Titanium.

JSON Source