twbs / twbs/bootstrap

Please log the affected DOM node to the console for error "Bootstrap doesn't allow more than one instance per element. Bound instance: bs.tooltip."

Open
#38,858 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature js v5
Dominant language
MDX
Stars
175k
Forks
78.6k
Avg merge
7h 19m
Merged PRs (30d)
35

Description

Prerequisites
Proposal

The error message "Bootstrap doesn't allow more than one instance per element. Bound instance: bs.tooltip." is pretty unhelpful for debugging. Especially when I have 100+ of these errors on CI after upgrading to Bootstrap 5. It would be very helpful to get a console.log of the affected DOM node.

General question about this topic unrelated to the feature request: if I understand the following discussion correctly, tooltip + dropdown on a single element are unsupported now and the hacky workaround is to nest a span with the tooltip inside of the dropdown menu. Is that the recommended method? Does this even help users with screenreaders? Also, I think this messes up the positioning of the Tooltip. Are there better ways to achieve this?

Motivation and context

Easier debugging while doing a Bootstrap upgrade.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by searching the codebase for the exact error text: "Bootstrap doesn't allow more than one instance per element." Trace the affected element through the error path and determine how to expose it in the console; done means the duplicate-instance error identifies the DOM node without changing the existing validation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.