mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Build the focus chain from focusable widgets
Rather than it being about widgets where `can_focus` is `True`, have it be about widgets that are currently able to receive focus. Before this change widgets with a positive `can_focus` but which were disabled would still end up in the chain.
This commit is contained in:
@@ -177,7 +177,7 @@ class Screen(Widget):
|
||||
else:
|
||||
if node.is_container and node.can_focus_children:
|
||||
push(iter(node.focusable_children))
|
||||
if node.can_focus:
|
||||
if node.focusable:
|
||||
add_widget(node)
|
||||
|
||||
return widgets
|
||||
|
||||
Reference in New Issue
Block a user