Don't check that a focusable widget can be focused

As per https://github.com/Textualize/textual/pull/954#discussion_r999501580

Good catch!
This commit is contained in:
Dave Pearson
2022-10-19 15:42:11 +01:00
parent 84e514e9e6
commit 2e5e58e599

View File

@@ -263,7 +263,7 @@ class Screen(Widget):
for candidate in reversed(
focusable_widgets[widget_index + 1 :] + focusable_widgets[:widget_index]
):
if candidate not in avoiding and candidate.can_focus:
if candidate not in avoiding:
chosen = candidate
break