Open
Description
This issue affects Textual 1.0.0. It feels close to #4639.
MRE
from textual.app import App
from textual.binding import Binding
from textual.widget import Widget
from textual.widgets import Footer, Input
class Wid(Widget, can_focus=True):
BINDINGS = [
('escape', 'escape', 'Widget Escape'),
('up', 'up', 'Widget Up'),
('down', 'down', 'Widget Down'),
]
DEFAULT_CSS = "Wid { max-height: 5; }"
class Inp(Input):
BINDINGS = [
('escape', 'escape', 'Input Escape'),
('up', 'up', 'Input Up'),
('down', 'down', 'Input Down'),
]
class MRE(App):
def compose(self):
yield Wid()
yield Inp()
yield Footer()
if __name__ == '__main__':
app = MRE()
app.run()
Expected behaviour
Textual 0.89.1 behaves as expected: focusing either the Wid
Widget or the Inp
Input leads to the following FooterKeys:
esc Input Escape ↑ Input Up ↓ Input Down
esc Widget Escape ↑ Widget Up ↓ Widget Down
Encountered behaviour
Textual 1.0.0 moves the escape
FooterKey. This happens only to the Inp
Input, not to the Wid
Widget:
↑ Input Up ↓ Input Down esc Input Escape
esc Widget Escape ↑ Widget Up ↓ Widget Down
Metadata
Metadata
Assignees
Labels
No labels