Skip to content

Commit

Permalink
fix(Service): Improve focus when switching services
Browse files Browse the repository at this point in the history
#1255
  • Loading branch information
adlk committed Feb 3, 2019
1 parent e7b482b commit d130f26
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stores/ServicesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ export default class ServicesStore extends Store {
this.all[index].isActive = false;
});
service.isActive = true;

this._focusActiveService();
}

@action _setActiveNext() {
Expand Down Expand Up @@ -341,6 +343,9 @@ export default class ServicesStore extends Store {
const service = this.one(serviceId);

if (service.webview) {
if (document.activeElement) {
document.activeElement.blur();
}
service.webview.focus();
}
}
Expand Down

0 comments on commit d130f26

Please sign in to comment.