diff --git a/containments/desktop/package/contents/ui/FolderView.qml b/containments/desktop/package/contents/ui/FolderView.qml --- a/containments/desktop/package/contents/ui/FolderView.qml +++ b/containments/desktop/package/contents/ui/FolderView.qml @@ -29,7 +29,7 @@ import org.kde.private.desktopcontainment.folder 0.1 as Folder import "FolderTools.js" as FolderTools -Item { +FocusScope { id: main signal pressed diff --git a/containments/desktop/package/contents/ui/FolderViewLayer.qml b/containments/desktop/package/contents/ui/FolderViewLayer.qml --- a/containments/desktop/package/contents/ui/FolderViewLayer.qml +++ b/containments/desktop/package/contents/ui/FolderViewLayer.qml @@ -139,12 +139,17 @@ target: plasmoid onExpandedChanged: { - if (root.isPopup && !plasmoid.expanded) { - goHome(); - - folderView.currentIndex = -1; - folderView.model.clearSelection(); - folderView.cancelRename(); + if (root.isPopup) { + if (plasmoid.expanded) { + folderView.currentIndex = -1; + folderView.forceActiveFocus(); + } else { + goHome(); + + folderView.currentIndex = -1; + folderView.model.clearSelection(); + folderView.cancelRename(); + } } } @@ -207,6 +212,7 @@ anchors.fill: parent + focus: true isRootView: true url: plasmoid.configuration.url