diff --git a/frame/qml/PanelMenu.qml b/frame/qml/PanelMenu.qml index a2104214c..ac9144715 100644 --- a/frame/qml/PanelMenu.qml +++ b/frame/qml/PanelMenu.qml @@ -62,6 +62,7 @@ Item { menuWindow.title = windowTitle menuWindow.show() DS.grabMouse(menuWindow) + DS.grabKeyboard(menuWindow) }) } @@ -75,6 +76,7 @@ Item { menuWindow.close() menuWindow.currentItem = null + DS.grabKeyboard(menuWindow, false) } Connections { diff --git a/panels/dock/tray/TrayItemSurfacePopup.qml b/panels/dock/tray/TrayItemSurfacePopup.qml index d2406a169..91be31765 100644 --- a/panels/dock/tray/TrayItemSurfacePopup.qml +++ b/panels/dock/tray/TrayItemSurfacePopup.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -162,6 +162,8 @@ Item { return Qt.rect(point.x, point.y, popupMenu.width, popupMenu.height) }) popupMenu.open() + // TODO: 解决自定义右键菜单上下键无法切换的问题 + popupMenuContent.takeFocus() } } }