Bug 390593

Summary: Clearing ledger search box doesn't return to the previous position
Product: [Applications] kmymoney Reporter: Musikolo <musikolo>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: minor CC: ostroffjh
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.0.1
Sentry Crash Report:

Description Musikolo 2018-02-17 04:42:18 UTC
When you have a long ledger history and search something, if you click on the cross (X) button to clear the search box, it doesn't return the focus to the previous position. It's always changing the position to the top of the page which is somehow annoying.

Thank you and congrats for your awesome job!
Comment 1 Jack 2018-02-17 15:13:15 UTC
I thought I had opened a bug about this, but can't find it quickly now.  When you clear the search, the correct transaction is still selected, but the focus is apparently on the search box, and certainly not on the main ledger display.  I have found a quick workaround is to hit Alt-Tab (which moved focus back to the list) then hit up-arrow and down-arrow to move the selection up and then back to the desired transaction.  With the focus back on the list, it moves the selected transaction back into view.
Comment 2 Musikolo 2018-02-17 16:40:34 UTC
Unfortunately, your workaround doesn't work for me. When I use Alt-Tab, the next application shows up, i.e., it cycles to the next application I have open.

It doesn't look like something very tough to fix, but I cannot state anything since I don't know how the code is.

Thank you!
Comment 3 Jack 2018-02-17 16:56:35 UTC
Sorry - I wrote that too quickly.  It's Shift-tab to move within an app.  Alt-tab switches apps.  To be more complete - Tab cycles around all the widgets that can receive focus within an application.  Shift-tab does the same in reverse order.  I simply discovered by trying various combinations that Shift-Tab, up-arrow, down-arrow works in this case.

While it may not be too difficult to fix, the priority right now is fixing some more serious bugs related to the migration from KDE4 to Frameworks.  Once that is all settled, the team will probably make an evaluation of all the outstanding bugs to see which can be fixed easily.
Comment 4 Musikolo 2018-02-18 07:45:40 UTC
I tried with Shift-Tab, and although it moves the focus on the ledger history area, it still doesn't restore the position where I was.

In my case, I was checking the last entry (at the bottom) of my ledger, clicked on the search box and typed something unrelated with the description of the last entry. Then when I clicked on the cross (X) button to clear the search, but the position is changed. I need to scroll down the history to restore the position where I was. Same happens when I use Shift-Tab.

Thank you!
Comment 5 wojnilowicz 2018-02-20 18:25:50 UTC
Git commit 3f08c3e3cb1c031275d9d1e1b411766e028c9bf0 by Łukasz Wojniłowicz.
Committed on 20/02/2018 at 18:21.
Pushed by wojnilowicz into branch 'master'.

Keep up with register changes
FIXED-IN:5.0.1

M  +6    -0    kmymoney/widgets/register.cpp
M  +3    -0    kmymoney/widgets/register.h
M  +9    -2    kmymoney/widgets/registersearchline.cpp

https://commits.kde.org/kmymoney/3f08c3e3cb1c031275d9d1e1b411766e028c9bf0
Comment 6 Thomas Baumgart 2018-02-20 19:08:49 UTC
Git commit 4b785962894d3b68d60dfe5fba57b3151a443c3d by Thomas Baumgart.
Committed on 20/02/2018 at 19:08.
Pushed by tbaumgart into branch '5.0'.

Keep up with register changes
FIXED-IN:5.0.1

(cherry picked from commit 3f08c3e3cb1c031275d9d1e1b411766e028c9bf0)

M  +6    -0    kmymoney/widgets/register.cpp
M  +3    -0    kmymoney/widgets/register.h
M  +9    -2    kmymoney/widgets/registersearchline.cpp

https://commits.kde.org/kmymoney/4b785962894d3b68d60dfe5fba57b3151a443c3d