Bug 435604 - Cursor position is not set properly for autocompleted search query when the textbox loses focus
Summary: Cursor position is not set properly for autocompleted search query when the t...
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.21.4
Platform: Other Other
: NOR minor
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-11 07:01 UTC by Kishore Gopalakrishnan
Modified: 2021-04-15 10:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2021-04-11 07:01:46 UTC
SUMMARY
When a query string is autocompleted and the user navigates to the results, krunner does not set the cursor position properly to the end of the string. This means that when the user later presses 'backspace', it starts deleting from the middle of the string.

STEPS TO REPRODUCE
1. Open krunner
2. Type something for which a completion exists (but don't type the entire completed string)
3. Press the down arrow
4. Press backspace twice

OBSERVED RESULTS
The cursor starts deleting from the place where the user stopped typing, not from the end of the completed query.

EXPECTED RESULTS
Backspace should delete characters starting from the end of the query.


SOFTWARE/OS VERSIONS
Linux distro: Arch Linux
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.12-arch1-1

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2021-04-11 07:11:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/778
Comment 2 Alexander Lohnau 2021-04-15 10:29:03 UTC
Git commit bee08091f3c9f6153948009793f2a590a5bb58bb by Alexander Lohnau.
Committed on 15/04/2021 at 10:28.
Pushed by alex into branch 'master'.

krunner: Always set cursor position to end when focusing search field

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

https://invent.kde.org/plasma/plasma-workspace/commit/bee08091f3c9f6153948009793f2a590a5bb58bb
Comment 3 Alexander Lohnau 2021-04-15 10:30:13 UTC
Git commit f5503e9a565390d264b2cfd28a48d71a66c51bce by Alexander Lohnau.
Committed on 15/04/2021 at 10:30.
Pushed by alex into branch 'Plasma/5.21'.

krunner: Always set cursor position to end when focusing search field


(cherry picked from commit bee08091f3c9f6153948009793f2a590a5bb58bb)

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

https://invent.kde.org/plasma/plasma-workspace/commit/f5503e9a565390d264b2cfd28a48d71a66c51bce