aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-01 09:30:10 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-01 09:30:10 +0200
commitccc20032a9d90e0d6bc39dba0202555685485bd3 (patch)
tree51e0eb4024e6b2d85cd284c3ca0a8b102d15ae62 /src
parent5.6.3-nightly.19 [skip ci] (diff)
downloadferdium-app-ccc20032a9d90e0d6bc39dba0202555685485bd3.tar.gz
ferdium-app-ccc20032a9d90e0d6bc39dba0202555685485bd3.tar.zst
ferdium-app-ccc20032a9d90e0d6bc39dba0202555685485bd3.zip
fix: Switching services via keyboard does not switch focus (#2004)
Diffstat (limited to 'src')
-rw-r--r--src/stores/ServicesStore.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 16defb327..2a4b0511c 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -620,6 +620,8 @@ export default class ServicesStore extends Store {
620 s.isActive = false; 620 s.isActive = false;
621 } 621 }
622 this.allDisplayed[nextIndex].isActive = true; 622 this.allDisplayed[nextIndex].isActive = true;
623
624 this._focusActiveService();
623 } 625 }
624 626
625 @action _setActivePrev() { 627 @action _setActivePrev() {
@@ -633,6 +635,8 @@ export default class ServicesStore extends Store {
633 s.isActive = false; 635 s.isActive = false;
634 } 636 }
635 this.allDisplayed[prevIndex].isActive = true; 637 this.allDisplayed[prevIndex].isActive = true;
638
639 this._focusActiveService();
636 } 640 }
637 641
638 @action _setUnreadMessageCount({ serviceId, count }) { 642 @action _setUnreadMessageCount({ serviceId, count }) {
@@ -682,11 +686,13 @@ export default class ServicesStore extends Store {
682 this._focusService({ serviceId: service.id }); 686 this._focusService({ serviceId: service.id });
683 if (this.stores.settings.app.splitMode && !focusEvent) { 687 if (this.stores.settings.app.splitMode && !focusEvent) {
684 setTimeout(() => { 688 setTimeout(() => {
685 document.querySelector('.services__webview-wrapper.is-active').scrollIntoView({ 689 document
686 behavior: 'smooth', 690 .querySelector('.services__webview-wrapper.is-active')
687 block: 'end', 691 .scrollIntoView({
688 inline: 'nearest', 692 behavior: 'smooth',
689 }); 693 block: 'end',
694 inline: 'nearest',
695 });
690 }, 10); 696 }, 10);
691 } 697 }
692 } else { 698 } else {