Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account list loses focus when using keyboard navigation #3396

Closed
3 of 7 tasks
cmbarbu opened this issue May 7, 2021 · 10 comments
Closed
3 of 7 tasks

Account list loses focus when using keyboard navigation #3396

cmbarbu opened this issue May 7, 2021 · 10 comments

Comments

@cmbarbu
Copy link

cmbarbu commented May 7, 2021

MMEX version:

  • 1.5.1

Note: bug reporters are expected to have verified the bug still exists
either in the last stable version of MMEX or on updated development code
(master branch).

Operating System:

  • Windows
  • Mac OSX
  • Linux

Description of the bug

It is not possible to navigate through the account list using the keyboard. After pressing "up" or "down" once, the focus moves to the ledger.

Reproduction

Is the bug reproducible?

  • Always
  • Randomly
  • Happened only once

Reproduction steps:

  1. Click on any account in the navigation pane
  2. Use keyboard navigation to move up or down in the list
  3. After key up, the navigation pane loses focus

Expected result: The previous / next account in the list is selected and gets focus.

Actual result: The previous / next account in the list is selected, but the navigation pane loses focus. Subsequent presses of the "up" or "down" keys will select transactions in the ledger.

Additional information

mmex-bug-account-navigation-1
mmex-bug-account-navigation-2

@vomikan vomikan added the bug label May 7, 2021
@vomikan vomikan added this to the v1.5.2 milestone May 7, 2021
@vomikan
Copy link
Member

vomikan commented May 7, 2021

#3194

@vomikan vomikan self-assigned this May 7, 2021
vomikan added a commit to vomikan/moneymanagerex that referenced this issue May 7, 2021
@vomikan vomikan added the fixed label May 7, 2021
vomikan added a commit that referenced this issue May 7, 2021
fix(#3396): Account list loses focus when using keyboard navigation
@2BeeOrNot
Copy link

This issue has be tagged as fixed. Has it been fixed for macOS? Using the up and down arrows in the navigation panel doesn't work at all in latest nightly built on May 9 2921 07:08:41. Same for latest build from Mark built on May 8. Previous nightly built on May 7 and Mark's May 7 build works as described as above.

@vomikan
Copy link
Member

vomikan commented May 10, 2021

@whalley please assist

@vomikan vomikan modified the milestones: v1.5.2, v1.5.3 May 10, 2021
@whalley
Copy link
Member

whalley commented May 10, 2021

Think the mmGUIFrame::OnKeyPressed(wxTreeEvent& event) needs an event.Skip(); at the end otherwise the up/down keys are not going to processed. But I'm intrigued as to why you needed to add the OnKeyPressed method anyway as the removal of the SetFocus() calls alone seems to solve the reported problem.

Was the key handling added for something to do with the Transaction report dialog?

@vomikan
Copy link
Member

vomikan commented May 10, 2021

Sometimes (even often) a good solution should be ripen.
And Yes. The Enter button allows you to reactivate the report.

@vomikan vomikan closed this as completed May 11, 2021
@vomikan vomikan modified the milestones: v1.5.3, v1.5.2 May 11, 2021
@whalley
Copy link
Member

whalley commented May 11, 2021

Just spotted that keyboard navigation in the transaction list is now broken!

@whalley whalley reopened this May 11, 2021
@whalley
Copy link
Member

whalley commented May 12, 2021

Pressing any key gives no response. Running in debug mode I get wxWidgets errors, e.g. pressing up arrow I get:

10:17:46: Debug: Unrecognised keycode 377
10:17:46: Debug: Unrecognised keycode 379
10:17:46: Debug: Unrecognised keycode 376
10:17:46: Debug: Unrecognised keycode 378
10:17:46: Debug: Unrecognised keycode 381
10:17:46: Debug: Unrecognised keycode 380
10:17:46: Debug: Unrecognised keycode 375
10:17:46: Debug: Unrecognised keycode 382
10:17:46: Debug: Unrecognised keycode 370
10:17:46: Debug: Unrecognised keycode 368

It seems to being generated from here: https://github.com/wxWidgets/wxWidgets/blob/master/src/osx/carbon/app.cpp

So looks like it may be MacOS specific. Not sure if this Locale related or related to the fixes here? Will need to back track to last build that this worked in and then look at changes.

@2BeeOrNot
Copy link

Works for me on macOS 10.15.7. 1.6.0 Alpha May 11 from IPX and latest nightly. I can use the up/down arrows to navigate in the account view. Same results on Windows 7. Can't use keyboard to go from navigation panel to account view.

@whalley
Copy link
Member

whalley commented May 12, 2021

Looks like something really odd with my Mac, as rebooting and even using earlier versions of app still exhibit this issue. I'll close again as seems localised to my setup...

@vomikan
Copy link
Member

vomikan commented May 12, 2021

Can't use keyboard to go from navigation panel to account view.

Possible solution is:
image

@vomikan vomikan modified the milestones: v1.5.2, v1.5.3 May 12, 2021
vomikan added a commit that referenced this issue May 14, 2021
fix(#3396): tidy key handling to use event data
@vomikan vomikan closed this as completed Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants