-
Notifications
You must be signed in to change notification settings - Fork 814
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
Button can be clicked while disabled #5076
Comments
I have a suspicion that the issue originates in
This code suggests that you can't do |
I'm not sure I understand what you mean by a button being disabled in this context? Perhaps the docs for Async handlers help explain this behaviour? |
Your The solution is highly dependent on what you want to implement (I don't know what work your async sleep is designed to replicate). You might want to investigate workers, but there are also timers and If you don't want the button to be clicked while the app is busy you can set I'd also encourage you to read the guide on Events and Messages. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
In specific situations, buttons can be clicked while disabled. Textual responds by queuing the button click and sends it when the button is next enabled.
When I run this example, click the button rapidly, and time the output, the label doesn't return to the "Not Running" state in the 5 seconds it should, it takes a multiple of 5 seconds.
The text was updated successfully, but these errors were encountered: