Update src/textual/app.py

Co-authored-by: darrenburns <darrenburns@users.noreply.github.com>
This commit is contained in:
Will McGugan
2022-10-18 15:16:45 +01:00
committed by GitHub
parent 45b5d4af0a
commit 87b6cbdc0a

View File

@@ -1265,8 +1265,7 @@ class App(Generic[ReturnType], DOMNode):
@property
def _binding_chain(self) -> list[tuple[DOMNode, Bindings]]:
"""Get a chain of nodes and bindings to consider. Goes from focused widget to app, or
screen to app.
"""Get a chain of nodes and bindings to consider. If no widget is focused, returns the bindings from both the screen and the app level bindings. Otherwise, combines all the bindings from the currently focused node up the DOM to the root App.
Returns:
list[tuple[DOMNode, Bindings]]: List of DOM nodes and their bindings.