Skip to content

fix(app): middle-click tab close in scrollable tab bar - #15081

Merged
nexxeln merged 4 commits into
anomalyco:devfrom
choephix:fix/middle-click-tab-close-scrollable
Feb 26, 2026
Merged

nexxeln merged 4 commits into
anomalyco:devfrom
choephix:fix/middle-click-tab-close-scrollable

Conversation

@choephix

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #15077

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Added a mousedown handler on TabsTrigger that calls preventDefault() on middle-click (button === 1) when onMiddleClick is defined. This stops the browser's autoscroll and lets the existing onAuxClick handler fire correctly.

How did you verify your code works?

Ran OpenCode locally. Opened enough tabs. Middle-clicked. Magic.

Screenshots / recordings

Before:
Image

After:
opencode11

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@nexxeln
nexxeln merged commit aae75b3 into anomalyco:dev Feb 26, 2026
9 checks passed
sebishogun pushed a commit to sebishogun/opencode that referenced this pull request Feb 26, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
figloalds pushed a commit to figloalds/opencode that referenced this pull request Feb 27, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Can't close tab via middle click if bar is scrollable

2 participants