Bug 444240 - After moving up/down with arrow keys, "esc" must be pressed twice to exit krunner
Summary: After moving up/down with arrow keys, "esc" must be pressed twice to exit kru...
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.23.1
Platform: Archlinux Linux
: NOR minor (vote)
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-22 16:03 UTC by afedotov861
Modified: 2021-10-28 20:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description afedotov861 2021-10-22 16:03:29 UTC
SUMMARY
When using the arrow keys to select a result after typing the query, the input box is defocused. When the text box is defocused, it takes two "esc" presses to exit krunner: the first refocuses the text box, and the second one to actually exit.

STEPS TO REPRODUCE
1. enter query in krunner
2. move up/down between queries
3. press esc once

OBSERVED RESULT
Text box defocuses on result selection using the up/down arrow keys. Text box refocuses when pressing "esc", or typing additional characters after using the up/down arrow keys

EXPECTED RESULT
Text box should always be focused, to hint the user that more text can always be typed, and so that "esc" closes krunner right away

SOFTWARE/OS VERSIONS
Linux: 5.14.14-arch1-1
KDE Plasma Version: 5.23.1
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Graphics Platform X11

ADDITIONAL INFORMATION
This bug is new to plasma 5.23, earlier versions did not behave this way.
Good for a first bugfix, I think.
Comment 1 Felipe Kinoshita 2021-10-22 18:24:28 UTC
Also happens for me on 5.22.5
Comment 2 Alexander Lohnau 2021-10-23 06:01:51 UTC
Confirmed, though in my workflow I usually press the krunner shortcut again to then hide it.
Comment 3 Alexander Lohnau 2021-10-25 16:53:58 UTC
Git commit 810b0726b2fea72f7c3ce2ecbe7fd771c8e5df00 by Alexander Lohnau.
Committed on 25/10/2021 at 16:53.
Pushed by alex into branch 'master'.

Hide KRunner window when pressing escape

Otherwise the check for the unprintable characters return true
and the search field is focused.

M  +4    -0    lookandfeel/contents/runcommand/RunCommand.qml

https://invent.kde.org/plasma/plasma-workspace/commit/810b0726b2fea72f7c3ce2ecbe7fd771c8e5df00
Comment 4 Alexander Lohnau 2021-10-25 16:54:39 UTC
Git commit b40ce029dcd0dea1b96c39535f40f0e92154a31e by Alexander Lohnau.
Committed on 25/10/2021 at 16:54.
Pushed by alex into branch 'Plasma/5.23'.

Hide KRunner window when pressing escape

Otherwise the check for the unprintable characters return true
and the search field is focused.


(cherry picked from commit 810b0726b2fea72f7c3ce2ecbe7fd771c8e5df00)

M  +4    -0    lookandfeel/contents/runcommand/RunCommand.qml

https://invent.kde.org/plasma/plasma-workspace/commit/b40ce029dcd0dea1b96c39535f40f0e92154a31e
Comment 5 afedotov861 2021-10-25 17:04:50 UTC
Does this change the defocusing behavior as well? I think the box should always be focused, to hint to the user that more text can always be entered.
Comment 6 afedotov861 2021-10-25 17:09:31 UTC
Also, related behavior: after clicking "keep open", the text box is defocused _and_ keyboard input is not registered until after clicking the text box again.
Comment 7 Alexander Lohnau 2021-10-26 13:19:42 UTC
Please file a separate bug report for it
Comment 8 afedotov861 2021-10-27 05:16:52 UTC
Will do, thank you for your work
Comment 9 afedotov861 2021-10-27 05:39:50 UTC
I did some more testing with krunner
If you change focus from the text box to the "keep open" or "settings" buttons using tab / shift+tab, and then press escape, krunner is still not closed
Comment 10 afedotov861 2021-10-27 05:48:35 UTC
I reported a similar bug (444470) addressing the defocusing behavior of the text box when pressing up/down. I clarified there that the user should still be able to change focus themselves using tab / shift+tab. I want to clarify here too, that I think pressing "esc" should close krunner no matter where the focus is.