Skip to content

Commit

Permalink
fix:(FullscreenFrame): reset keyboard focus and search text when hide
Browse files Browse the repository at this point in the history
当隐藏全屏启动器时,清除键盘焦点,清除搜索状态。

Issue: linuxdeepin/developer-center#6162
Log:
  • Loading branch information
BLumia committed Nov 13, 2023
1 parent 9168f14 commit 10fb72f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions qml/FullscreenFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ import org.deepin.vendored 1.0
import org.deepin.launchpad 1.0

Control {
id: baseLayer
visible: true
anchors.fill: parent
focus: true
objectName: "FullscreenFrame-BaseLayer"

leftPadding: (DesktopIntegration.dockPosition === Qt.LeftArrow ? DesktopIntegration.dockGeometry.width : 0) + 20
rightPadding: (DesktopIntegration.dockPosition === Qt.RightArrow ? DesktopIntegration.dockGeometry.width : 0) + 20
Expand Down Expand Up @@ -365,4 +367,16 @@ Control {
LauncherController.visible = false;
}
}

Connections {
target: LauncherController
function onVisibleChanged() {
// only do these clean-up steps on launcher get hide
if (LauncherController.visible) return
// clear searchEdit text
searchEdit.text = ""
// reset(remove) keyboard focus
baseLayer.focus = true
}
}
}

0 comments on commit 10fb72f

Please sign in to comment.