Skip to content
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

Merged
merged 22 commits into from Aug 29, 2011
Merged

TIMOB-4345 Android: focus and blur events don't fire on window with url #357

merged 22 commits into from Aug 29, 2011

Conversation

billdawson
Copy link
Contributor

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.)

@@ -140,11 +140,13 @@ public class TiUIWindow extends TiUIView

protected void initContext()
{
boolean hasUrl = proxy.hasProperty(TiC.PROPERTY_URL);
Copy link
Contributor

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?

if (!newActivity) {
if (activity instanceof TiBaseActivity) {
activityProxy = ((TiBaseActivity)activity).getActivityProxy();
}
}
} else if (!lightWeight) {
windowContext = TiContext.createTiContext(windowActivity, proxy.getTiContext().getBaseUrl(), proxy.getTiContext().getCurrentUrl());
Copy link
Contributor

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..

@marshall
Copy link
Contributor

Code review accepted

@marshall
Copy link
Contributor

Functional review also accepted. Compared with iOS behavior and it looks like we're in sync.

@donthorp
Copy link
Contributor

Code Reviewed. Request Accepted.

donthorp added a commit that referenced this pull request Aug 29, 2011
TIMOB-4345 Android: focus and blur events don't fire on window with url
@donthorp donthorp merged commit 2fec69f into tidev:master Aug 29, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants