fix(ui): prevent middle-click scroll when closing tabs#15087
Closed
HRronaldo wants to merge 6 commits intoanomalyco:devfrom
Closed
fix(ui): prevent middle-click scroll when closing tabs#15087HRronaldo wants to merge 6 commits intoanomalyco:devfrom
HRronaldo wants to merge 6 commits intoanomalyco:devfrom
Conversation
✨ 功能改进: - 🔍 智能检测同步提交并跳过生成 - 🎛️ 支持手动触发(workflow_dispatch) - 🏃 使用标准ubuntu-latest runner - 🔄 添加GitHub App不可用时的备用认证 - 📝 提供清晰的状态反馈和错误处理 🔧 修复问题: - 解决Blacksmith runner在fork中的权限问题 - 避免同步操作触发无意义的生成任务 - 提供友好的错误信息和操作指导
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
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 |
252b1a1 to
324826f
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #15077
Problem
Middle-clicking a tab while the tab bar is scrollable doesn't close it.
Solution
Added an
onMouseDownhandler that callspreventDefault()for middle-click (button === 1), preventing the default scroll behavior beforeonAuxClickfires.Changes
packages/ui/src/components/tabs.tsx: AddedonMouseDownhandler to prevent scroll on middle-clickTesting
Verification