diff --git a/qml/Desktop/Main.qml b/qml/Desktop/Main.qml index 3fd9855..30f9457 100644 --- a/qml/Desktop/Main.qml +++ b/qml/Desktop/Main.qml @@ -111,7 +111,10 @@ Item { } onActiveFocusChanged: { - if (!activeFocus) { + // The context menu is a separate popup window. Opening it moves + // focus away from the desktop, but the selected item must remain + // selected while the menu builds and handles its actions. + if (!activeFocus && !desktopMenu.visible) { _folderView.cancelRename() dirModel.clearSelection() }