mirror of
https://github.com/rivo/tview.git
synced 2026-04-29 14:55:54 +03:00
[GH-ISSUE #699] Inconsistency between documentation and code #510
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#510
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 @us91 on GitHub (Feb 4, 2022).
Original GitHub issue: https://github.com/rivo/tview/issues/699
In the documentation for
func (*Box) SetInputCapture, it is mentioned that:"Note that this function will not have an effect on primitives composed of other primitives, such as Form, Flex, or Grid. Key events are only captured by the primitives that have focus (e.g. InputField) and only one primitive can have focus at a time. Composing primitives such as Form pass the focus on to their contained primitives and thus never receive any key events themselves. Therefore, they cannot intercept key events."
However, in the demo code
presentation, the Grid page usesSetInputCapturewhich seems to work when Enter is pressed. This is not necessarily a bug. But some clarification on how the input capture works for composite primitives would be appreciated.@rivo commented on GitHub (Feb 16, 2022):
You're right. This behaviour was changed a while back but I forgot to update this part of the documentation. I just fixed that.