Skip to content

Commit bb499f6

Browse files
committed
stop actions
1 parent 2f1bdea commit bb499f6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/textual/app.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,8 +1753,8 @@ async def check_bindings(self, key: str, priority: bool = False) -> bool:
17531753
):
17541754
binding = bindings.keys.get(key)
17551755
if binding is not None and binding.priority == priority:
1756-
await self.action(binding.action, default_namespace=namespace)
1757-
return True
1756+
if await self.action(binding.action, namespace) in (True, None):
1757+
return True
17581758
return False
17591759

17601760
async def on_event(self, event: events.Event) -> None:
@@ -1843,11 +1843,9 @@ async def _dispatch_action(
18431843
)
18441844

18451845
if callable(private_method):
1846-
await invoke(private_method, *params)
1847-
return True
1846+
return await invoke(private_method, *params)
18481847
elif callable(public_method):
1849-
await invoke(public_method, *params)
1850-
return True
1848+
return await invoke(public_method, *params)
18511849

18521850
return False
18531851

0 commit comments

Comments
 (0)