Bug 461952 - Adding new payee or category by typing in the transaction form triggers "Do you want to add" after typing the first character that doesn't match an existing name
Summary: Adding new payee or category by typing in the transaction form triggers "Do y...
Status: REOPENED
Alias: None
Product: kmymoney
Classification: Applications
Component: ux-ui (show other bugs)
Version: git (master)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2022-11-17 14:50 UTC by Paul Worrall
Modified: 2024-09-18 19:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Worrall 2022-11-17 14:50:26 UTC
SUMMARY
When entering a new transaction, if I try to enter a new name by typing in the Payer/Payee or Category boxes, and the characters I type trigger the drop-down list, typing a subsequent character that doesn't match an existing name triggers the "Do you want to add?" dialogue making it impossible to type the full name.

For example: If I already have a Payee called "Employer" and I want to create a transaction with "Pension" as a new payee, I type "P", (the drop down list appears), then type "e", the dialogue appears asking if I want to create a payee called "Pe"

STEPS TO REPRODUCE (Using Payee as the example)
1. Open a book with at least one Payee already defined
2. Open a ledger
3. Start to enter a new transaction
4. Start typing in the Payer/Payee box some characters that match the name of an existing payee so that the drop-down list appears
5. Try to type further characters to define a new name

OBSERVED RESULT
The dialogue asking you to confirm the creation of a new Payee appears after typing one further character that does not match an existing payee

EXPECTED RESULT
The dialogue doesn't appear until the text box loses the focus

SOFTWARE/OS VERSIONS
KMyMoney: 5.1.80
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Sometimes two "Do you want to add" dialogues can be triggered at the same time
Comment 1 Thomas Baumgart 2022-11-19 05:34:29 UTC
I am unable to duplicate this behavior here. I am on X11, though. Are you in a position to try it using X11?
Comment 2 Paul Worrall 2022-11-19 08:12:29 UTC
I also cannot reproduce on X11 so this is specific to Wayland.
Comment 3 Jack 2023-07-09 23:56:24 UTC
I can confirm this problem on Wayland and not X11.  I have no idea if it is in any way related to the fact that our current appimages (at least as of a week or so ago) do not work under Wayland.  At least Wayland is now stable enough for me that I can run either Wayland or X11 without too much trouble, so I can test possible solutions, although I don't have any current suggestions.
Comment 4 Thomas Baumgart 2024-04-08 17:47:18 UTC
Is this still happening on Wayland?
Comment 5 Paul Worrall 2024-04-09 10:24:43 UTC
I can't reproduce it using kmymoney-master-3185-linux-gcc-x86_64.AppImage under Wayland so setting status to FIXED.  

I'll try and test it with a local build of git master and update the status if necessary
Comment 6 Jack 2024-04-10 22:29:32 UTC
With 5.1.80-a3e6958ff compiled from source (have not yet checked appimage) It looks good for me also, with the exception that once I do hit a character where the name typed so far would be uniqe, it shows TWO of the "do you want to add " poups.  In addition, It does that as soon as the name is not known, where it should not even check that until you hit enter or tab out of the field, otherwise there is still no way to actually enter a new value.  Should I reopen, or would this count as a new/different bug?
Comment 7 Paul Worrall 2024-04-11 06:24:04 UTC
(In reply to Jack from comment #6)
That sounds exactly like the bug I reported, so reopening
Comment 8 Thomas Baumgart 2024-04-11 08:54:58 UTC
I am unable to reproduce this (neither compiled nor latest appimage) on my X-Window based system. Does this only appear under Wayland?
Comment 9 Jack 2024-04-11 14:51:06 UTC
Yes, Wayland only.  I suppose the problem is somewhere deep in how each keypress is handled.  I can run under a debugger, if you can point me where to look, or perhaps suggest where it might help to add some DEBUG output.
Comment 10 Thomas Baumgart 2024-04-12 16:29:36 UTC
I can imagine, that closing the popup can trigger it. That happens in KMyMoneyAccountCombo::makeCompletion()  https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/widgets/kmymoneyaccountcombo.cpp?ref_type=heads#L476 . One could try to comment this line to leave the popup view open and see if that makes a difference. 

Another idea is using a debugger and setting a breakpoint to https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/views/transactioneditorbase.cpp?ref_type=heads#L227. Once it stops, figure out what triggers the event by examining the call stack.
Comment 11 Paul Worrall 2024-09-18 09:38:15 UTC
I can no longer reproduce this using the Appimage for 5.1.80-1270b9c, mark as fixed?
Comment 12 Jack 2024-09-18 19:31:50 UTC
Let's leave it open for now, until either I also can't reproduce, or I can run it under a debugger.  (I usually run X11, so will have to restart my session as Wayland first.)