Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 6, 2025

The dropdown transition was broken because inline display: none/block styles were interfering with CSS transitions. When an element has display: none, CSS transitions cannot work properly as the element is immediately removed from the layout.

Problem

The BDropdown component was setting inline styles with {display: showRef ? 'block' : 'none'} which prevented smooth CSS transitions from working. This caused dropdown menus to appear and disappear abruptly without any fade or transition effects.

Solution

Added a targeted CSS rule that overrides the inline display style specifically during transition states:

/* Override inline display styles during transitions to allow proper CSS transitions */
.dropdown-menu.fade.showing {
  display: block !important;
}

This rule only applies when the dropdown menu has both fade and showing classes, which are present during CSS transitions. This allows the transition animations to work properly while maintaining the correct display behavior in non-transition states.

Testing

  • All existing tests pass (1597 tests)
  • Manual testing confirmed smooth transitions for both regular and split dropdowns
  • Build and linting processes pass without issues
  • No regressions in dropdown functionality

The fix is minimal, targeted, and preserves all existing functionality while restoring smooth transitions.

Screenshots

Before fix - dropdowns work but without smooth transitions:
Dropdown before fix

After fix - smooth transitions restored:
Normal dropdown working
Split dropdown working

Fixes #2811.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copilot AI changed the title [WIP] PR #2768 breaks transition in dropdown Fix dropdown transition broken by inline display styles Sep 6, 2025
Copilot AI requested a review from VividLemon September 6, 2025 01:38
@VividLemon VividLemon marked this pull request as ready for review September 6, 2025 01:44
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 6, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@VividLemon VividLemon merged commit 0363c2f into main Sep 6, 2025
7 checks passed
@github-actions github-actions bot mentioned this pull request Sep 6, 2025
xvaara added a commit to xvaara/bootstrap-vue-next that referenced this pull request Sep 11, 2025
* upstream/main: (32 commits)
  chore: release main (bootstrap-vue-next#2838)
  feat(BButtonToolbar): Add keyboard navigation support (bootstrap-vue-next#2837)
  fix(BFormSelect): modelValue not being applied during SSR (bootstrap-vue-next#2835)
  feat(BTable): Implement keyboard navigation (bootstrap-vue-next#2834)
  fix: BOffcanvas responsive SSR compatibility - defer breakpoint evaluation to client-side (bootstrap-vue-next#2833)
  chore: release main (bootstrap-vue-next#2831)
  fix(BDropdown): transition broken by inline display styles (bootstrap-vue-next#2832)
  feat: change useColorMode selector from 'body' to 'html' (bootstrap-vue-next#2830)
  chore: release main (bootstrap-vue-next#2817)
  feat: Add headerAttrs prop to BOffcanvas and BModal components
  docs: Add useScrollspy documentation
  fix: Remove lazy-modifier warning on FormInput docs (bootstrap-vue-next#2825)
  feat(BSort)!: Implement initial-sort-direction and move compare from sort-by to fields (bootstrap-vue-next#2777)
  docs(table): fix incorrect list item (bootstrap-vue-next#2823)
  docs: Fix grammar in documentation data files (bootstrap-vue-next#2816)
  doc(BTooltip): Parity pass (bootstrap-vue-next#2762)
  docs(BOverlay): Parity pass (bootstrap-vue-next#2767)
  feat: implement BFormRating disabled state (bootstrap-vue-next#2753) (bootstrap-vue-next#2793)
  docs: fix otp for index and reference pages (bootstrap-vue-next#2819)
  docs(BApp): add some additional details around legacy plugin use (bootstrap-vue-next#2820)
  ...
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.

PR #2768 breaks transition in dropdown

2 participants