mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #585] Mouse click breaks SetFocus #428
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#428
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 @paulbdavis on GitHub (Mar 31, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/585
Setting up a view like this:
The return values from the mock function
getInputAndView()are(*tview.InputField, tview.Primitive)When I use the keyboard to dismiss the modal, the input is properly focused when the root and focus are set, but if I use the mouse to do it, it does not focus the input.
Calling
SetFocusin a goroutine afterwards half fixes the problem; keyboard events are taken but the cursor does not display until typing starts@rivo commented on GitHub (Apr 26, 2021):
I had a look at the
tviewcode but it's not obvious how this can happen. Can you please post a small program (not just a snippet) that I can run that reproduces this issue?@rivo commented on GitHub (May 31, 2021):
Might be related to #612. If there are no further problems, I will close this issue soon.
@gdamore commented on GitHub (Jun 17, 2021):
It certainly sounds like #612 to me.