Skip to content

fix(ui): prevent middle-click scroll when closing tabs#15087

Closed
HRronaldo wants to merge 6 commits intoanomalyco:devfrom
HRronaldo:fix/middle-click-close-tab
Closed

fix(ui): prevent middle-click scroll when closing tabs#15087
HRronaldo wants to merge 6 commits intoanomalyco:devfrom
HRronaldo:fix/middle-click-close-tab

Conversation

@HRronaldo
Copy link

@HRronaldo HRronaldo commented Feb 25, 2026

Summary

Fixes #15077

Problem

Middle-clicking a tab while the tab bar is scrollable doesn't close it.

Solution

Added an onMouseDown handler that calls preventDefault() for middle-click (button === 1), preventing the default scroll behavior before onAuxClick fires.

Changes

  • packages/ui/src/components/tabs.tsx: Added onMouseDown handler to prevent scroll on middle-click

Testing

  1. Open enough files to make the tab bar scrollable
  2. Middle-click a tab to close it
  3. Tab should close successfully without triggering scroll

Verification

  • Code follows project style guide
  • No new lint errors

opencode-agent bot and others added 5 commits February 11, 2026 15:20
✨ 功能改进:
- 🔍 智能检测同步提交并跳过生成
- 🎛️ 支持手动触发(workflow_dispatch)
- 🏃 使用标准ubuntu-latest runner
- 🔄 添加GitHub App不可用时的备用认证
- 📝 提供清晰的状态反馈和错误处理

🔧 修复问题:
- 解决Blacksmith runner在fork中的权限问题
- 避免同步操作触发无意义的生成任务
- 提供友好的错误信息和操作指导
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Feb 25, 2026
@github-actions
Copy link
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found:

Why it's related: Both PRs address the exact same issue - preventing middle-click scroll behavior when closing tabs in a scrollable tab bar. PR #15081 appears to be an earlier or parallel attempt to fix issue #15077, covering the same root cause (middle-click triggering scroll before onAuxClick fires).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:compliance This means the issue will auto-close after 2 hours.

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

1 participant