diff --git a/src/textual/screen.py b/src/textual/screen.py index cf233fbc8a..60c327c30d 100644 --- a/src/textual/screen.py +++ b/src/textual/screen.py @@ -775,7 +775,7 @@ async def _on_idle(self, event: events.Idle) -> None: finally: if self._bindings_updated: self._bindings_updated = False - self.app.call_later(self.bindings_updated_signal.publish, self) + self.bindings_updated_signal.publish(self) def _compositor_refresh(self) -> None: """Perform a compositor refresh.""" diff --git a/src/textual/signal.py b/src/textual/signal.py index 3f7cf78a28..59881bdde6 100644 --- a/src/textual/signal.py +++ b/src/textual/signal.py @@ -108,7 +108,7 @@ def publish(self, data: SignalT) -> None: """ # Don't publish if the DOM is not ready or shutting down - if not self._owner.is_attached: + if not self._owner.is_attached or not self._owner.app._exit: return for ancestor_node in self._owner.ancestors_with_self: if not ancestor_node.is_running: