mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge pull request #961 from davep/bug/939/loss-of-focus-tidy-up
Post-PR #954 tidy up
This commit is contained in:
@@ -1454,8 +1454,8 @@ class App(Generic[ReturnType], DOMNode):
|
||||
widget = event.widget
|
||||
parent = widget.parent
|
||||
|
||||
remove_widgets = list(
|
||||
widget.walk_children(Widget, with_self=True, method="depth", reverse=True)
|
||||
remove_widgets = widget.walk_children(
|
||||
Widget, with_self=True, method="depth", reverse=True
|
||||
)
|
||||
|
||||
if self.screen.focused in remove_widgets:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user