Skip to content

Commit d130f26

Browse files
committed
fix(Service): Improve focus when switching services
#1255
1 parent e7b482b commit d130f26

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/stores/ServicesStore.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ export default class ServicesStore extends Store {
291291
this.all[index].isActive = false;
292292
});
293293
service.isActive = true;
294+
295+
this._focusActiveService();
294296
}
295297

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

343345
if (service.webview) {
346+
if (document.activeElement) {
347+
document.activeElement.blur();
348+
}
344349
service.webview.focus();
345350
}
346351
}

0 commit comments

Comments
 (0)