Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Band-aids for focus management code #1492

Merged
merged 2 commits into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/controllers/git-tab-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ export default class GitTabController extends React.Component {
}

rememberLastFocus(event) {
if (!this.refView) {
return;
}

this.lastFocus = this.refView.rememberFocus(event) || GitTabView.focus.STAGING;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/views/commit-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export default class CommitView extends React.Component {
return CommitView.focus.COMMIT_BUTTON;
}

if (this.refCoAuthorSelect.map(c => c.wrapper.contains(event.target)).getOr(false)) {
if (this.refCoAuthorSelect.map(c => c.wrapper && c.wrapper.contains(event.target)).getOr(false)) {
return CommitView.focus.COAUTHOR_INPUT;
}

Expand Down