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

Web demo stops repainting after clicking #3633

Closed
YgorSouza opened this issue Nov 25, 2023 · 2 comments · Fixed by #3640
Closed

Web demo stops repainting after clicking #3633

YgorSouza opened this issue Nov 25, 2023 · 2 comments · Fixed by #3640
Assignees
Labels
bug Something is broken web Related to running Egui on the web
Milestone

Comments

@YgorSouza
Copy link
Contributor

Describe the bug

On the web demo, the UI stops repainting after you click anywhere, and only starts again when you move the mouse. Also, when you press Ctrl+C, it pauses for a fraction of a second. This does not affect the native desktop demo.

To Reproduce
Steps to reproduce the behavior:

  1. Open the web demo
  2. Select continuous mode or open something that is animated, like plot demo or the fractal clock
  3. Click anywhere on the screen and leave the mouse completely still
  4. The UI stops repainting until you move the mouse

Expected behavior

The UI should continue to repaint as normal after clicking or pressing Ctrl+C.

Screenshots

web_demo_click_bug.mp4

Desktop (please complete the following information):

  • OS: Fedora 38, Windows 11
  • Browser Firefox
  • Version 120

Smartphone (please complete the following information):
(not tested)

Additional context

This seems to have been caused by #3623.

@YgorSouza YgorSouza added the bug Something is broken label Nov 25, 2023
@abey79
Copy link
Collaborator

abey79 commented Nov 25, 2023

I believe this is the same as another phenomenon I just observed: collapsing header need the mouse to move around to complete animation:

egui_0.24_bug.mp4

@YgorSouza
Copy link
Contributor Author

Yes, one effect of that is that all animations freeze when you click. My guess is that the click event resets the "needs_repaint" flag somehow, no matter how many widgets called request_repaint on that frame. And so it doesn't repaint again until it gets an input event. There are a lot of changes in that PR related to that, but I don't understand it well enough to see where the problem is.

Note that this bug is not in the 0.24 release AFAICT, as it was introduced yesterday just after the release.

@emilk emilk added the web Related to running Egui on the web label Nov 27, 2023
@emilk emilk added this to the 0.24.1 milestone Nov 27, 2023
@emilk emilk self-assigned this Nov 27, 2023
emilk added a commit that referenced this issue Nov 27, 2023
Closes #3633

Bug introduced in #3623 (after 0.24.0 was cut)
emilk added a commit that referenced this issue Nov 27, 2023
Closes #3633

Bug introduced in #3623 (after 0.24.0 was cut)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken web Related to running Egui on the web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants