Stop propagation on tab close so the row doesn't re-select

The launcher row's `on_click` selects the tab. Its child close glyph
also has its own `on_click` that selects + closes. After the close,
the click bubbled up to the row, which then tried to re-select the
tab we just removed — usually a no-op but a wasted state churn that
can race with the close in BrowserCore.

Add `cx.stop_propagation()` after the close handler so the click
ends at the close glyph.
This commit is contained in:
2026-05-09 21:45:03 -04:00
parent 41b5208006
commit adb278b3bb
@@ -273,8 +273,12 @@ impl ElyShell {
.hover(|style| style.bg(rgba(0x281e1414)).text_color(rgb(colors::INK)))
.cursor_pointer()
.on_click(cx.listener(move |shell, _, window, cx| {
// Close the tab without bubbling to the launcher row's
// own on_click — otherwise the row tries to re-select
// the tab right after we've closed it.
shell.select_tab(&close_tab_id, window, cx);
shell.close_active_tab(window, cx);
cx.stop_propagation();
}))
.child(IconName::Close),
)