Problem/Motivation
The dropdown has an extra hover-based behavior applied via the CSS rule:
.dropdown:hover > .dropdown-menu {
display: block;
}
This duplicates the default click-based behavior. As a result, the dropdown opens both on hover and on click, which leads to inconsistent and glitchy UI interaction.
Steps to reproduce
1. Place a dropdown (e.g., language selector) in the header.
2. Move the cursor over it: the menu opens.
3. Click the dropdown toggle: the menu state conflicts with the hover behavior and does not collapse reliably.
Proposed resolution
Remove the hover-based rule to ensure the dropdown state is controlled only by click. This restores the expected Bootstrap/standard dropdown behavior.
Issue fork flexistyle_bootstrap-3556654
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
kir lazur commentedComment #4
murzFaced this bug too, when we add any Bootstrap Dropdown to the page, it starts to behave wrong: instead of "onclick" it opens on the hover, because of this CSS override. The MR fixes the issue well, so marking as RTBC.
By the way, we also have this CSS, related to dropdowns above the removed rules:
Do we really need it? I think it's better to keep the default Bootstrap Dropdown behavior, and use Bootstrap-related classes in Twig, instead of overriding the behavior by CSS.
Comment #5
murzComment #6
murz@anoopsingh92, could you please review and merge this fix? It breaks all the Bootstrap dropdowns in the header :(
Comment #9
anoopsingh92Merged, Thank you!