From 13cab6e58e4f1b7b56b4dd6963d804b78613f55e Mon Sep 17 00:00:00 2001 From: Travis Wrightsman Date: Fri, 17 May 2024 17:28:14 -0400 Subject: [PATCH] Return correct bindings inside modal widgets --- CHANGELOG.md | 6 ++++++ src/textual/app.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70e5c7cff6f..551100d853b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## Unreleased + +### Fixed + +- Return correct bindings inside modal widgets + ## [0.60.1] - 2024-05-15 ### Fixed diff --git a/src/textual/app.py b/src/textual/app.py index 7c7c3fe3800..d11e37e4c3b 100644 --- a/src/textual/app.py +++ b/src/textual/app.py @@ -868,7 +868,7 @@ def namespace_bindings(self) -> dict[str, tuple[DOMNode, Binding]]: """ bindings_map: dict[str, tuple[DOMNode, Binding]] = {} - for namespace, bindings in self._binding_chain: + for namespace, bindings in self._modal_binding_chain: for key, binding in bindings.keys.items(): if existing_key_and_binding := bindings_map.get(key): _, existing_binding = existing_key_and_binding