aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-02-03 20:55:36 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-02-03 20:55:36 +0100
commitd130f267d2cf6610ae20aab2995b830c661d0bc6 (patch)
tree13e64f0404d98300114027826f0c5c3e35ad0de9 /src
parentUpdate README.md (diff)
downloadferdium-app-d130f267d2cf6610ae20aab2995b830c661d0bc6.tar.gz
ferdium-app-d130f267d2cf6610ae20aab2995b830c661d0bc6.tar.zst
ferdium-app-d130f267d2cf6610ae20aab2995b830c661d0bc6.zip
fix(Service): Improve focus when switching services
Diffstat (limited to 'src')
-rw-r--r--src/stores/ServicesStore.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 84f84891a..0ab57312a 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -291,6 +291,8 @@ export default class ServicesStore extends Store {
291 this.all[index].isActive = false; 291 this.all[index].isActive = false;
292 }); 292 });
293 service.isActive = true; 293 service.isActive = true;
294
295 this._focusActiveService();
294 } 296 }
295 297
296 @action _setActiveNext() { 298 @action _setActiveNext() {
@@ -341,6 +343,9 @@ export default class ServicesStore extends Store {
341 const service = this.one(serviceId); 343 const service = this.one(serviceId);
342 344
343 if (service.webview) { 345 if (service.webview) {
346 if (document.activeElement) {
347 document.activeElement.blur();
348 }
344 service.webview.focus(); 349 service.webview.focus();
345 } 350 }
346 } 351 }