Skip to content
Discussion options

You must be logged in to vote

You can disable auto-focus on the App or Screen with the AUTO_FOCUS attribute.

from textual.app import App, ComposeResult
from textual.widgets import Input


class NoAutoFocusApp(App):
    AUTO_FOCUS = ""

    def compose(self) -> ComposeResult:
        yield Input()


if __name__ == "__main__":
    app = NoAutoFocusApp()
    app.run()

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by blackdwarf
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants