egui/crates
Lucas Meurer 0ef57d5a1d Fix `ui.response().interact(Sense::click())` being flakey (#7713)
This fixes calls to `ui.response().interact(Sense::click())` being
flakey. Since egui checks widget interactions at the beginning of the
frame, based on the responses from last frame, we need to ensure that we
always call `create_widget` on `interact` calls, otherwise there can be
a feedback loop where the `Sense` egui acts on flips back and forth
between frames.

Without the fix in `interact`, both the asserts in the new test fail.

Here is a video where I experienced the bug, showing the sense switching
every frame. Every other click would fail to be detected.


https://github.com/user-attachments/assets/6be7ca0e-b50f-4d30-bf87-bbb80c319f3b

Also note, usually it's better to use `UiBuilder::sense()` to give a Ui
some sense, but sometimes you don't have the flexibility, e.g. in a `Ui`
callback from some code external to your project.
2025-11-13 13:53:59 +01:00
..
ecolor Merge branch 'main' into release-0.33.0 2025-10-09 15:51:02 +02:00
eframe Make sure `native_pixels_per_point` is set during app creation (#7683) 2025-11-13 11:53:50 +01:00
egui Fix `ui.response().interact(Sense::click())` being flakey (#7713) 2025-11-13 13:53:59 +01:00
egui-wgpu Fix jittering during window resize on MacOS for WGPU/Metal (#7641) 2025-11-13 11:53:50 +01:00
egui-winit Don't enable `arboard` on iOS (#7663) 2025-11-13 11:47:53 +01:00
egui_demo_app Prevent widgets sometimes appearing to move relative to each other (#7710) 2025-11-13 11:53:51 +01:00
egui_demo_lib Prevent widgets sometimes appearing to move relative to each other (#7710) 2025-11-13 11:53:51 +01:00
egui_extras Merge branch 'main' into release-0.33.0 2025-10-09 15:51:02 +02:00
egui_glow Merge branch 'main' into release-0.33.0 2025-10-09 15:51:02 +02:00
egui_kittest Release egui_kittest 0.33.1 2025-11-13 11:47:53 +01:00
egui_plot Move `egui_plot` to its own repo (#4828) 2024-07-15 18:45:19 +02:00
egui_web Rename `master` branch to `main` (#7034) 2025-05-08 09:15:42 +02:00
emath Fix edge cases in "smart aiming" in sliders (#7680) 2025-11-13 11:53:50 +01:00
epaint Merge branch 'main' into release-0.33.0 2025-10-09 15:51:02 +02:00
epaint_default_fonts Update changelogs 2025-10-09 14:23:58 +02:00