mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-04 19:19:54 +00:00
fix(tui): ignore hidden tab close hitbox (#39940)
This commit is contained in:
parent
ee6577936d
commit
14e4c3dfd7
1 changed files with 3 additions and 0 deletions
|
|
@ -341,6 +341,9 @@ export function SessionTabs(props: { controller?: SessionTabsController; animati
|
|||
fg={closeColor()}
|
||||
selectable={false}
|
||||
onMouseUp={(event) => {
|
||||
// The close mark only renders while hovered; without motion events a click can
|
||||
// land here first, and must select the tab instead of closing it invisibly.
|
||||
if (hovered() !== tab.sessionID) return
|
||||
event.stopPropagation()
|
||||
tabs.close(tab === NEW_SESSION_TAB ? undefined : tab.sessionID)
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue