You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm thinking that screen could grow a auto_focus parameter which takes a selector. It would then focus the first matching node, if there is one.
This would need to be done when the screen is first made active, and when it is resumed. i.e. if a screen is popped off the stack, the new one should focus.
auto_focus should be "*" by default to focus the first focusable thing. auto_focus may be set to None to disable auto focus.
The text was updated successfully, but these errors were encountered:
willmcgugan
changed the title
Add option, possibly the default, to auto focus the first thing on a screen.
Add option to auto focus the first thing on a screen.
May 2, 2023
For the case where there's a stack with 2+ screens, when we pop a screen and we go back to a previous screen, I think we should preserve the widget that was already focused previously.
I'm thinking that screen could grow a
auto_focus
parameter which takes a selector. It would then focus the first matching node, if there is one.This would need to be done when the screen is first made active, and when it is resumed. i.e. if a screen is popped off the stack, the new one should focus.
auto_focus
should be"*"
by default to focus the first focusable thing.auto_focus
may be set toNone
to disable auto focus.The text was updated successfully, but these errors were encountered: