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

Bindings not updated after leaving Select by clicking outside terminal #5157

Open
mzebrak opened this issue Oct 23, 2024 · 2 comments
Open

Comments

@mzebrak
Copy link

mzebrak commented Oct 23, 2024

Clicking outside the terminal collapses the Select menu but does not update the binding.

Video:

Screencast.from.10-23-2024.12.37.10.PM.webm

MRE:

from __future__ import annotations

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


class MyApp(App):
    BINDINGS = [
        Binding("escape", "quit()", "Quit app"),
    ]

    def compose(self) -> ComposeResult:
        yield Select([(str(i), i) for i in range(3)])
        yield Footer()

MyApp().run()
Copy link

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@mzebrak mzebrak changed the title Bindings not updated when leaving Select by clicking outside of terminal Bindings not updated after leaving Select by clicking outside terminal Oct 23, 2024
@mzebrak
Copy link
Author

mzebrak commented Oct 23, 2024

Actually, maybe the root issue is that Select shouldn't collapse when you click outside?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant