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

Clicking Select doesn't properly collapse overlay #4489

Closed
TomJGooding opened this issue May 7, 2024 · 5 comments · Fixed by #4499
Closed

Clicking Select doesn't properly collapse overlay #4489

TomJGooding opened this issue May 7, 2024 · 5 comments · Fixed by #4499
Labels
bug Something isn't working

Comments

@TomJGooding
Copy link
Contributor

It looks like there might have been an unintended change to the behaviour of the Select widget.

You can reproduce this using the basic example from the docs. Try clicking the Select to expand the overlay, then click it again. This should collapse the overlay, but it now quickly pops back up again.

I haven't dived into details yet but it looks like the relevant commit is ab9ea3f.

Copy link

github-actions bot commented May 7, 2024

We found the following entries 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

@willmcgugan willmcgugan added the bug Something isn't working label May 7, 2024
@TomJGooding
Copy link
Contributor Author

I don't understand why yet, but I found if you click exactly on the ▲ arrow everything works as expected.

@willmcgugan
Copy link
Collaborator

I noticed that. Weird. It's something to do with the mechanism that hides the drop down with the widget is blurred. But I haven't dug up any more than that...

@TomJGooding
Copy link
Contributor Author

Comparing the logs from textual console, if you click the arrow the SelectOverlay seems to be hidden before the Static arrow is hidden. For reasons I don't understand yet, this means the Click event which triggers the Toggle message is never actually fired, yet everything works as expected. Whereas clicking anywhere apart from the arrow also then fires the Click event, causing the overlay to expand again after just being collapsed.

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