Permalink
Browse files

fix(Service): Improve focus when switching services

  • Loading branch information...
adlk committed Feb 3, 2019
1 parent e7b482b commit d130f267d2cf6610ae20aab2995b830c661d0bc6
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/stores/ServicesStore.js
@@ -291,6 +291,8 @@ export default class ServicesStore extends Store {
this.all[index].isActive = false;
});
service.isActive = true;

this._focusActiveService();
}

@action _setActiveNext() {
@@ -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();
}
}

0 comments on commit d130f26

Please sign in to comment.