diff --git a/kcms/notifications/package/contents/ui/SourcesPage.qml b/kcms/notifications/package/contents/ui/SourcesPage.qml --- a/kcms/notifications/package/contents/ui/SourcesPage.qml +++ b/kcms/notifications/package/contents/ui/SourcesPage.qml @@ -87,15 +87,15 @@ id: sourcesScroll Layout.fillWidth: true Layout.fillHeight: true - activeFocusOnTab: false Kirigami.Theme.colorSet: Kirigami.Theme.View Kirigami.Theme.inherit: false Component.onCompleted: background.visible = true ListView { id: sourcesList clip: true + focus: true activeFocusOnTab: true keyNavigationEnabled: true @@ -136,14 +136,20 @@ currentIndex = filteredIdx.row; } + onCurrentIndexChanged: { + var sourceIdx = kcm.filteredModel.mapToSource(kcm.filteredModel.index(sourcesList.currentIndex, 0)); + appConfiguration.rootIndex = kcm.sourcesModel.makePersistentModelIndex(sourceIdx); + sourcesList.updateCurrentIndex(); + } + delegate: QtControls.ItemDelegate { id: sourceDelegate width: sourcesList.width text: model.display highlighted: ListView.isCurrentItem onClicked: { - var sourceIdx = kcm.filteredModel.mapToSource(kcm.filteredModel.index(index, 0)); - appConfiguration.rootIndex = kcm.sourcesModel.makePersistentModelIndex(sourceIdx); + sourcesList.forceActiveFocus(); + sourcesList.currentIndex = index; sourcesList.updateCurrentIndex(); }