New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TIMOB-4345 Android: focus and blur events don't fire on window with url #357
Conversation
…has no url but is not lightweight
… NOT go into the current stable branch -- commit 1183a48 is enough to fix the problem in the ticket)
@@ -140,11 +140,13 @@ public class TiUIWindow extends TiUIView | |||
|
|||
protected void initContext() | |||
{ | |||
boolean hasUrl = proxy.hasProperty(TiC.PROPERTY_URL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use the resolver to handle the case the URL was put in the open call?
…stead of just proxy.hasProperty since url could be passed in open() arguments.
if (!newActivity) { | ||
if (activity instanceof TiBaseActivity) { | ||
activityProxy = ((TiBaseActivity)activity).getActivityProxy(); | ||
} | ||
} | ||
} else if (!lightWeight) { | ||
windowContext = TiContext.createTiContext(windowActivity, proxy.getTiContext().getBaseUrl(), proxy.getTiContext().getCurrentUrl()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
proxy.getTiContext() is used twice here and at least once below, we could make a local reference up top to avoid method calls..
Code review accepted |
Functional review also accepted. Compared with iOS behavior and it looks like we're in sync. |
Code Reviewed. Request Accepted. |
TIMOB-4345 Android: focus and blur events don't fire on window with url
http://jira.appcelerator.org/browse/TIMOB-4345
This change binds the activity proxy and window proxy in the case where window has no url but is not lightweight.
The test case is the fail case in the item.
NOTE There are two commits in this pull request. The first one -- 1183a48 -- is enough to fix the problem. The second one is a refactoring of sorts in
initContext()
<---- this second one should not go into 1_7_X in case we decide to fix the problem in 1_7_X, because the refactoring incurs some risk. So if we merge anything into 1_7_X for this JIRA item, only cherry-pick 1183a48. (At the moment the ticket does not say we should merge into 1_7_X, but I put this note here just in case that changes.)