mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #612] Inexplicable mouse focus behavior #448
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#448
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 @gdamore on GitHub (May 28, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/612
I'm building a form with a modal, which works fine. But when I use the mouse to click the button to dismiss the modal (or to change page), the focus seems to be lost. I've tried forcing the focus back by using app.SetFocus(), but that doesn't seem to work. The only way to get focus back on my application is to use the mouse to click on a visible component.
This isn't a huge deal, but it is confusing. I spent a lot of time trying to figure out workarounds in my application, but to no avail. I haven't debugged it further in your code.
@rivo commented on GitHub (May 29, 2021):
Do you have some brief code that I can run to reproduce this?
@gdamore commented on GitHub (May 29, 2021):
I figured you'd ask for this. At present I don't (part of a bigger app) but I suspect if you have a list and a modal you'd observe that after clicking the button on the modal with the mouse the focus is lost. I will see if I can put together a small reproducer this weekend.
@rivo commented on GitHub (May 31, 2021):
I was able to reproduce this. I believe the latest commit fixes it.