Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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._start_active_affect does not respect App.animation_level #5058

Closed
dillydill123 opened this issue Sep 26, 2024 · 1 comment
Closed

Comments

@dillydill123
Copy link

dillydill123 commented Sep 26, 2024

I think if App.animation_level is set to "none" it should not run any active effect on the button. My use case is that for tests, if my pilot tries to click the same button twice in a row, it happens so fast that the -active class is still set for the button and the click is consumed without self.press() being called.

My current work around is to patch this function. mock.patch("textual.widgets._button.Button._start_active_affect")

Also nit but I think it should be start_active_effect and not start_active_affect

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

@dillydill123 dillydill123 changed the title Button._start_active_effect does not respect App.animation_level Button._start_active_affect does not respect App.animation_level Sep 26, 2024
@Textualize Textualize locked and limited conversation to collaborators Sep 28, 2024
@willmcgugan willmcgugan converted this issue into discussion #5072 Sep 28, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant