mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #733] Can't tab with form centered by flex #536
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#536
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @drognisep on GitHub (Jun 10, 2022).
Original GitHub issue: https://github.com/rivo/tview/issues/733
First, I've had a wonderful time using this library. It seems very well designed and it's really easy to get going with all the documentation in the wiki. :)
The thing is, I've run into a hiccup that seems like it must be a bug. I'm trying to center a Form in a nested Flex as is shown here, and when that is done I can no longer tab through the form's fields.
I've tried a few different options, and it looks like either using Grid or not nesting at all will still allow me to tab through. Here's a way to reproduce it.
In case it's relevant, here are my environment details. I thought that maybe 1.17 was a problem, and I needed to update anyway, but this had no effect.
tcellversiontviewversion@rivo commented on GitHub (Jun 10, 2022):
The
Flexversion is actually twoFlex's, one inside the other. The innerFlexdidn't get the focus so your form also didn't. I fixed this on the Wiki page. And in your code (yes,UseFlex2is the proper way)):(I would prefer the
Gridversion as it is simpler. The Wiki page was created beforeGridexisted so it also lists the oldFlexversion.)@drognisep commented on GitHub (Jun 12, 2022):
Oh! I see. So the outer middle flex item will delegate focus to the inner middle flex item, which will delegate to the form?
And agreed, the grid version is a lot simpler to use for this case. :)
@drognisep commented on GitHub (Jun 12, 2022):
Just tested locally and this is working wonderfully! Thank you! :D
@rivo commented on GitHub (Jun 12, 2022):
Yes, that's correct.
@drognisep commented on GitHub (Jun 12, 2022):
Thanks for confirming, @rivo. :)
And thanks again for putting this together. Really well done, sir. 👍