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: fix the source of tabGroup focus events. #3160

Merged
merged 4 commits into from Oct 12, 2012

Conversation

hieupham007
Copy link
Contributor

@ghost ghost assigned ayeung Oct 11, 2012

String event = focused ? TiC.EVENT_FOCUS : TiC.EVENT_BLUR;

if (eventEmitter instanceof TabProxy) {
Copy link
Contributor

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
}

@hieupham007
Copy link
Contributor Author

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) {
Copy link
Contributor

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

@joshthecoder
Copy link
Contributor

Code reviewed. Accepted

@ayeung
Copy link
Contributor

ayeung commented Oct 12, 2012

Code reviewed and functionally tested. Request Accepted

ayeung pushed a commit that referenced this pull request Oct 12, 2012
timob-11339: fix the source of tabGroup focus events.
@ayeung ayeung merged commit e89dbdc into tidev:master Oct 12, 2012
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