py_cui icon indicating copy to clipboard operation
py_cui copied to clipboard

Vertical navigation is broken

Open PabloLec opened this issue 3 years ago • 0 comments

Describe the bug Currently, you cannot use up and down arrow keys to navigate if below element is not in the same column. This means you can skip rows, e.g go from button on row 1 to button on row 5. But you cannot go from button on row 1, column 1 to button on row 5, column 2. You'll be stuck.

And, as a bonus, I think you can actually select a non selectable widget (.set_selectable(False)) via arrow keys.

To Reproduce Steps to reproduce the behavior:

  1. Create just two widgets, say two buttons.
  2. Button 1 is on row 1, column 1
  3. Button 2 is on row 2, column 2
  4. Try to use down arrow key.

Expected behavior You should be able to move to the lower (or upper) nearest neighbor. Current behavior just doesn't feel right. In my case, for RecoverPy, I want to make a form-like view and navigation is just broken at some point.

Screenshots Current: not_working

Fixed: working

I'll publish a PR in a few minutes to fix this issue.

PabloLec avatar Oct 16 '21 10:10 PabloLec