From 27f4c9c7bc73a8acc33967bae52c677addd80d5e Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 19 Oct 2026 12:22:57 -0400 Subject: [PATCH] Touch pan: a pan that never saw its release doesn't swallow the next press Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/grid.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ui-egui/src/grid.rs b/crates/ui-egui/src/grid.rs index 6f5c5246f..4baf1c06a 100644 --- a/crates/ui-egui/src/grid.rs +++ b/crates/ui-egui/src/grid.rs @@ -769,6 +769,10 @@ pub fn show(app: &mut SheetApp, ui: &mut egui::Ui) { } // Interaction. let previous_popups = (app.grid.filter_menu, app.grid.list_picker, app.grid.header_menu); + // A pan the grid never saw end (it was hidden mid-drag) must not swallow the next press. + if app.grid.touch_pan && !resp.dragged() && !resp.drag_stopped() { + app.grid.touch_pan = false; + } if app.grid.touch_pan { // Skip the frames of a touch pan, its release included. if !resp.dragged() {