Commit 585427ce authored by Nate Graham's avatar Nate Graham 🔩
Browse files

[Applet] Focus search field after showing it

...Otherwise you need to manually click on it after showing it before you can start
typing into it, and that's just annoying.

BUG: 416482
FIXED-IN: 5.18.0

Test Plan:
Click search button to show search field
Search field is shown and has focus

Reviewers: #plasma, jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 70c5d48f
......@@ -223,7 +223,13 @@ GridLayout {
placeholderText: i18ndc("plasma-nm", "text field placeholder text", "Search...")
visible: searchToggleButton.checked
onVisibleChanged: if (!visible) text = ""
onVisibleChanged: {
if (visible) {
} else {
text = ""
Keys.onEscapePressed: {
//Check if the searchbar is actually visible before accepting the escape key. Otherwise, the escape key cannot dismiss the applet until one interacts with some other element.
if (searchToggleButton.checked) {
Markdown is supported
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