From 6cf2defca9ec076f83dff218ba425e609e59e117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 9 May 2026 22:28:41 -0400 Subject: [PATCH] Stop propagation on split-pane close so the pane doesn't reselect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same fix as `adb278b` but for the split-pane close glyph: clicking × fires the pane wrapper's `on_click(select_tab)` after the close runs. Add `cx.stop_propagation()` so the close ends at the glyph. --- crates/ely_app/src/shell/chrome/split_pane.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ely_app/src/shell/chrome/split_pane.rs b/crates/ely_app/src/shell/chrome/split_pane.rs index 6b6700d..2dfd5a1 100644 --- a/crates/ely_app/src/shell/chrome/split_pane.rs +++ b/crates/ely_app/src/shell/chrome/split_pane.rs @@ -90,8 +90,12 @@ fn render_close_glyph(close_tab_id: TabId, cx: &mut Context) -> AnyEle .cursor_pointer() .hover(|style| style.text_color(rgb(colors::INK))) .on_click(cx.listener(move |shell, _, window, cx| { + // The split pane itself has an on_click that selects the + // tab. Stop propagation here so closing the pane doesn't + // also re-select the just-removed tab. shell.select_tab(&close_tab_id, window, cx); shell.close_active_tab(window, cx); + cx.stop_propagation(); })) .child(IconName::Close) .into_any_element()