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 11339 3 0 x: Fix the source of tabGroup focus events #3193

Merged
merged 3 commits into from
Oct 12, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions android/modules/ui/src/java/ti/modules/titanium/ui/TabProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,15 @@ void onFocusChanged(boolean focused, KrollDict eventData)

// The focus and blur events for tab changes propagate like so:
// window -> tab -> tab group
//
// The window is optional and will be skipped if it does not exist.
TiViewProxy eventEmitter = (window != null) ? window : this;
eventEmitter.fireEvent((focused) ? TiC.EVENT_FOCUS : TiC.EVENT_BLUR, eventData, true);
//
// The window is optional and will be skipped if it does not exist.
String event = focused ? TiC.EVENT_FOCUS : TiC.EVENT_BLUR;

if (window != null) {
window.fireEvent(event, null, false);
}
fireEvent(event, eventData, true);

}

void close() {
Expand Down