Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footer bindings invisible on app launch #4550

Closed
darrenburns opened this issue May 23, 2024 · 2 comments · Fixed by #4551
Closed

Footer bindings invisible on app launch #4550

darrenburns opened this issue May 23, 2024 · 2 comments · Fixed by #4551
Labels
bug Something isn't working

Comments

@darrenburns
Copy link
Member

If I declare a binding in a widget, it doesn't appear on the new footer until I move my mouse:

footer-issue-textual.mov

In the video above, the footer is empty. When the mouse cursor moves, it populates.

MRE:

from textual.app import App, ComposeResult
from textual.binding import Binding
from textual.widgets import Footer, Input

class MyInput(Input):
    BINDINGS = [Binding("escape", "app.quit", "Exit Elia", key_display="esc")]

class FooterDelay(App[None]):
    def compose(self) -> ComposeResult:
        yield MyInput()
        yield Footer()

app = FooterDelay()
if __name__ == "__main__":
    app.run()
@TomJGooding
Copy link
Contributor

TomJGooding commented May 23, 2024

Looks like the bad commit is 135fab6 - presumably the self.mouse_over check?

If you comment out the lines below on main, this example app works as expected but obviously multiple tests then fail.

textual/src/textual/app.py

Lines 2277 to 2278 in 6034065

if self.mouse_over is None:
return

Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants