Skip to content

Conversation

@darrenburns
Copy link
Member

@darrenburns darrenburns commented Dec 11, 2024

In the browser for example, an input element will only select its content if I tab to it. If I alt+tab to another app then alt+tab back, it doesn't select everything.

This updates Textual to match this behaviour.

Added

Changed

@willmcgugan
Copy link
Member

I don't think so. At least not currently. But you can find the login in App._watch_app_focus

Added a new argument `from_app_focus` to the Focus event class to indicate whether the focus event was triggered by the application regaining focus or by user interaction within the Textual app. Updated the constructor to initialize this new attribute.
… App regaining focus or whether they're a standard focus.
@darrenburns darrenburns changed the title Command palette dont select on focus Don't apply Input "select on focus" behaviour when app is focused Dec 12, 2024
@darrenburns darrenburns marked this pull request as ready for review December 12, 2024 14:46
@willmcgugan willmcgugan merged commit 39ddb85 into main Dec 18, 2024
23 checks passed
@willmcgugan willmcgugan deleted the command-palette-dont-select-on-focus branch December 18, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants