bootstrap
bootstrap copied to clipboard
Bootstrap doesn't allow more than one instance per element. Bound instance: bs.dropdown
Prerequisites
- [X] I have searched for duplicate or closed issues
- [X] I have validated any HTML to avoid common problems
- [X] I have read the contributing guidelines
Describe the issue
i want show tooltip on dropdown toggle button
i thinks it's bug, why i can't use two different component for one element ?
Reduced test cases
https://codepen.io/Davood-Jafari/pen/yLGXWXX
const el = document.querySelector('#myBtn');
new Dropdown(el);
new Tooltip(el);
<div class="dropdown">
<button
id="myBtn"
class="btn btn-secondary dropdown-toggle"
data-bs-title="Default tooltip"
type="button"
data-bs-toggle="dropdown"
aria-expanded="false">
Dropdown button
</button>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item" href="#"> Action </a>
</li>
<li>
<a class="dropdown-item" href="#"> Another action </a>
</li>
<li>
<a class="dropdown-item" href="#"> Something else here </a>
</li>
</ul>
</div>
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
5.2.3