[GH-ISSUE #150] Escape key on modals not working #118

Closed
opened 2026-03-04 01:02:08 +03:00 by kerem · 1 comment
Owner

Originally created by @SamWhited on GitHub (Aug 3, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/150

The documentation for a the modal SetDoneFunc method says:

SetDoneFunc sets a handler which is called when one of the buttons was pressed. It receives the index of the button as well as its label text. The handler is also called when the user presses the Escape key. The index will then be negative and the label text an emptry string.

However, if escape is pressed on a modal the handler is never fired and there does not appear to be any event handler for the escape key in modal.go.

Originally created by @SamWhited on GitHub (Aug 3, 2018). Original GitHub issue: https://github.com/rivo/tview/issues/150 The documentation for a the modal `SetDoneFunc` method says: > SetDoneFunc sets a handler which is called when one of the buttons was pressed. It receives the index of the button as well as its label text. The handler is also called when the user presses the Escape key. The index will then be negative and the label text an emptry string. However, if escape is pressed on a modal the handler is never fired and there does not appear to be any event handler for the escape key in `modal.go`.
kerem closed this issue 2026-03-04 01:02:08 +03:00
Author
Owner

@rivo commented on GitHub (Aug 7, 2018):

Just merged your PR. Thanks for spotting this.

<!-- gh-comment-id:410958441 --> @rivo commented on GitHub (Aug 7, 2018): Just merged your PR. Thanks for spotting this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#118
No description provided.