Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextArea still uses Escape to move focus on #4110

Closed
davep opened this issue Feb 2, 2024 · 3 comments · Fixed by #4125
Closed

TextArea still uses Escape to move focus on #4110

davep opened this issue Feb 2, 2024 · 3 comments · Fixed by #4125
Labels
bug Something isn't working Task

Comments

@davep
Copy link
Contributor

davep commented Feb 2, 2024

While "out of the box" TextArea now uses Tab to shift focus, it also still uses Escape, ideally it would not when in this mode. Pressing Escape to exit a modal dialog would be common, so having Escape do something different given one particular widget type would be surprising for the user.

For example, this dialog uses Escape as the quick exit key, but instead if moves focus if you happen to press it while in the TextArea:

Screenshot 2024-02-02 at 21 18 15

@davep davep added bug Something isn't working Task labels Feb 2, 2024
@darrenburns
Copy link
Member

Yeah I realised this on Thursday. Since we don't have dynamic key bindings I think we'll have to just manage the escape press in "on_key" instead of as a binding.

@willmcgugan
Copy link
Collaborator

You can raise SkipAction from an action, which allow bindings from parents to run. If that helps.

Copy link

github-actions bot commented Feb 7, 2024

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants