mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
sneaky commit, bet Darren doesn't notice.
This commit is contained in:
@@ -562,6 +562,10 @@ class Screen(Generic[ScreenResultType], Widget):
|
|||||||
except NoWidget:
|
except NoWidget:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if widget.has_class("-textual-system"):
|
||||||
|
# Clicking Textual system widgets should not focus anything
|
||||||
|
return None
|
||||||
|
|
||||||
for node in widget.ancestors_with_self:
|
for node in widget.ancestors_with_self:
|
||||||
if isinstance(node, Widget) and node.focusable:
|
if isinstance(node, Widget) and node.focusable:
|
||||||
return node
|
return node
|
||||||
|
|||||||
Reference in New Issue
Block a user