diff --git a/qml/FullscreenFrame.qml b/qml/FullscreenFrame.qml index 1c1f6cf4..51cbf752 100644 --- a/qml/FullscreenFrame.qml +++ b/qml/FullscreenFrame.qml @@ -887,8 +887,15 @@ InputEventItem { Connections { target: LauncherController function onVisibleChanged() { - // only do these clean-up steps on launcher get hide - if (LauncherController.visible) return + if (LauncherController.visible) { + baseLayer.forceActiveFocus() + Qt.callLater(() => { + if (!baseLayer.activeFocus) { + console.warn("[LaunchpadFocus] FullscreenFrame: BUG_WARNING - baseLayer failed to acquire activeFocus after forceActiveFocus()!") + } + }) + return + } // clear searchEdit text searchEdit.text = "" if (listviewPage.currentItem) { diff --git a/qml/windowed/WindowedFrame.qml b/qml/windowed/WindowedFrame.qml index 2b7eda8b..10df3b08 100644 --- a/qml/windowed/WindowedFrame.qml +++ b/qml/windowed/WindowedFrame.qml @@ -305,8 +305,15 @@ InputEventItem { Connections { target: LauncherController function onVisibleChanged() { - // only do these clean-up steps on launcher get hide - if (LauncherController.visible) return + if (LauncherController.visible) { + baseLayer.forceActiveFocus() + Qt.callLater(() => { + if (!baseLayer.activeFocus) { + console.warn("[LaunchpadFocus] WindowedFrame: BUG_WARNING - baseLayer failed to acquire activeFocus after forceActiveFocus()!") + } + }) + return + } // clear searchEdit text bottomBar.searchEdit.text = ""