question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A `Widget`-derived widget with `inherit_bindings=False`, but no `BINDINGS`, appears to still inherit bindings

See original GitHub issue

This is very much related to #1343, but I think merits an issue of its own to consider first. The reasons why this happens seem clear enough, but I feel the setup may cause confusion. With Textual as it is of 0.6.0 (with the bindings for movement keys being on Widget), consider this widget:

class Odradek( Widget, inherit_bindings=False ):
    pass

vs this:

class Odradek( Widget, inherit_bindings=False ):
    BINDINGS = []

In the former case the bindings of Widget are still inherited. In the latter they’re not.

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
willmcgugancommented, Dec 13, 2022
0reactions
github-actions[bot]commented, Dec 13, 2022

Don’t forget to star the repository!

Follow @textualizeio for Textual updates.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tkinter can higher level widget bindings be triggered in child ...
Yes, you can set things up so that events that happen on any widget will trigger a binding on a higher level widget....
Read more >
TestWidgetsFlutterBinding class - flutter_test library - Dart API
Generally, one widget in the widget tree registers itself as a binding observer, and converts the system state into inherited widgets. inherited.
Read more >
Modern Bindings for the Text Widget - the Tcler's Wiki!
The Text binding tag allows successive Shift-Button-1 events to change both ends of the selection, by moving the selection anchor to the end...
Read more >
Dynamically Modify the Query, Initial Selection, and Widgets ...
Bindings can dynamically modify a query, set an initial filter selection, or change a widget's appearance. For example, you can change the measure...
Read more >
Events and Bindings - GitHub Pages
In this example, we use the bind method of the frame widget to bind a callback function to an event called <Button-1>. Run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found