[TIMOB-282] Can't close a new window when created from a menu item
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-07-16T17:04:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | 0.8.0, android, scrub-invalid |
Reporter | Dav Glass |
Assignee | Neeraj Gupta |
Created | 2011-04-15T02:26:38.000+0000 |
Updated | 2012-07-16T17:04:51.000+0000 |
Description
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:
http://gist.github.com/247895">http://gist.github.com/247895
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.
Are there any errors in the trace level log? Most of the java errors go there.
I don't see a Java error, but from JS Titanium.UI.currentWindow is undefined
Not valid, does not reproduce in TiMOB SDK 1.7.5 as we no longer use HTML for our markup language
No longer applicable since this was a bug in the "old" Titanium.