Skip to content

Commit

Permalink
Merge pull request #3193 from hieupham007/timob-11339-3_0_X
Browse files Browse the repository at this point in the history
Timob 11339 3 0 x: Fix the source of tabGroup focus events
  • Loading branch information
ayeung committed Oct 12, 2012
2 parents cd88dd0 + 8539218 commit d4f4a32
Showing 1 changed file with 9 additions and 4 deletions.
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

0 comments on commit d4f4a32

Please sign in to comment.