Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix tooltip directive interfering with button group styling#2844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/fix-1911

Conversation

Copy link
Contributor

CopilotAI commentedSep 15, 2025
edited
Loading

When aBButton orBDropdown withv-b-tooltip is placed as the last element in aBButtonGroup, the right-side border radius disappears, breaking the visual consistency of the button group.

Root Cause

The issue occurs because the tooltip directive inserts a<span> element as the next sibling of the button element. This breaks Bootstrap's CSS:last-child selectors that applyborder-radius to the last button in a group:

Before fix:

<divclass="btn-group"><button>First</button><button>Last with tooltip</button><!-- NOT :last-child ❌ --><span><!-- tooltip container --></span><!-- Now this is :last-child --></div>

Solution

Modified thevBTooltip directive to automatically detect when an element is inside a button group (using the existingbuttonGroupKey injection) and use body placement for tooltips in button groups. This prevents DOM interference while maintaining full tooltip functionality.

After fix:

<divclass="btn-group"><button>First</button><button>Last with tooltip</button><!-- :last-child ✅ --></div><!-- Tooltip rendered in document.body instead -->

Changes

  • EnhancedvBTooltip directive to detect button group context
  • Automatically apply body placement when inside button groups
  • Added comprehensive test coverage for button group scenarios
  • Maintains backward compatibility for all existing tooltip usage

Visual Result

Button groups with proper rounded corners

All button groups now maintain proper rounded corners regardless of tooltip placement, while tooltips remain fully functional.

Fixes#1911.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn moreCopilot coding agent tips in the docs.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz CodeflowRun & review this pull request inStackBlitz Codeflow.

Co-authored-by: VividLemon <31498096+VividLemon@users.noreply.github.com>
CopilotAI changed the title[WIP] Buttongroup: last button/dropdown loses rounding if using v-b-tooltipFix tooltip directive interfering with button group stylingSep 15, 2025
Copilot finished work on behalf ofVividLemonSeptember 15, 2025 13:55
@github-actions
Copy link
Contributor

This PR is stale because it has been open for 45 days with no activity. It will not be auto-closed

@github-actionsgithub-actionsbot added the staleThere has been no additional replies or questions and the thread is assumed closed labelOct 31, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@VividLemonVividLemonAwaiting requested review from VividLemon

At least 1 approving review is required to merge this pull request.

Labels

staleThere has been no additional replies or questions and the thread is assumed closed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Buttongroup: last button/dropdown loses rounding if using v-b-tooltip

2 participants

@VividLemon

[8]ページ先頭

©2009-2025 Movatter.jp