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: fix the source of tabGroup focus events. #3160
Conversation
|
||
String event = focused ? TiC.EVENT_FOCUS : TiC.EVENT_BLUR; | ||
|
||
if (eventEmitter instanceof TabProxy) { |
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.
We can probably factor out line 209 and just do something like:
if (win != null ) {
// fire for window
} else {
// fire for tab
}
Code updated. |
// 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) { |
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.
Actually since we fire the event onto the tab in either condition (window is present for this tab or not) we can get rid of the else.
if (window != null) {
// fire event onto window first.
}
// fire event onto tab
Sorry about going around in circles. Didn't notice the fireEvent for tab was the same in both conditions. :\
Code reviewed. Accepted |
Code reviewed and functionally tested. Request Accepted |
timob-11339: fix the source of tabGroup focus events.
Testing steps in JIRA: http://jira.appcelerator.org/browse/TIMOB-11339