Commit 4272f75d authored by Arjen Hiemstra's avatar Arjen Hiemstra Committed by Nate Graham
Browse files

Don't use forceActiveFocus to focus the applet toolbar

Generally, using forceActiveFocus is a bad thing since it indicates
something is wrong in how focus is setup. It is also unnecessary here.
PlasmoidHeading is a focus scope which means we can set whatever default
focus we want inside it and then simply focus the heading to get our
desired behaviour.

In addition, we now use Plasmoid.expanded to retrigger the focus binding
so that it is properly reset on re-showing the applet.

(cherry picked from commit 974fe05e)
parent db76733a
Pipeline #159200 passed with stage
in 1 minute and 23 seconds
......@@ -35,6 +35,7 @@ PlasmaExtras.Representation {
header: PlasmaExtras.PlasmoidHeading {
focus: true
Toolbar {
id: toolbar
width: parent.width
......@@ -153,7 +153,7 @@ RowLayout {
inputMethodHints: Qt.ImhNoPredictiveText
focus: Kirigami.InputMethod ? !Kirigami.InputMethod.willShowOnActive : true
focus: plasmoid.expanded && !Kirigami.InputMethod.willShowOnActive
clearButtonShown: true
placeholderText: i18nc("text field placeholder text", "Search…")
......@@ -177,10 +177,4 @@ RowLayout {
Component.onCompleted: {
if (!Kirigami.InputMethod || !Kirigami.InputMethod.willShowOnActive) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment