From 3e6c273b9de182aa3a35921237afbfb3c7844380 Mon Sep 17 00:00:00 2001 From: aiongg Date: Fri, 20 Nov 2026 21:41:16 +0000 Subject: [PATCH] Popover replay trial: the popover's first stop sits outside the view, which replays while nothing changes --- crates/ui-widgets/tests/it/body/memo_view.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ui-widgets/tests/it/body/memo_view.rs b/crates/ui-widgets/tests/it/body/memo_view.rs index c125fbcc8..8ebd67d65 100644 --- a/crates/ui-widgets/tests/it/body/memo_view.rs +++ b/crates/ui-widgets/tests/it/body/memo_view.rs @@ -1147,7 +1147,7 @@ fn a_drag_on_a_popover_over_a_view_replays_the_view() { assert!(runs.iter().all(Vec::is_empty), "the board replays in every drag frame: {runs:?}"); } -/// A view inside an open popover: the popover's body is on its own layer. +/// A view inside an open popover, after a button: the popover's body is on its own layer. struct InPopover { /// Where the view's button was shown in the last frame. button: Option, @@ -1158,6 +1158,9 @@ impl InPopover { let button = &mut self.button; frames.frame(events, |ui| { Popover::new("Presets", Bind::given(true)).at_point(Pos2::new(80.0, 80.0)).show(ui, |ui, _| { + // The popover's first stop, outside the view, takes the focus on open: a view that holds the focus + // runs in every pass. + Button::new("Search").show(ui); *button = MemoView::new("presets", Title { title: "Inside".to_owned() }, title).show(ui); }); });