Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #37665
Closed
Open
Issue created Dec 17, 2022 by Administrator@rootContributor3 of 3 checklist items completed3/3 checklist items

There is an error in the usage instructions provided by the document *tooltip*

Created by: y377

Prerequisites

  • I have searched for duplicate or closed issues
  • I have validated any HTML to avoid common problems
  • I have read the contributing guidelines

Describe the issue

wrong description context :

Enable tooltips tooltip code block

When there are multiple places on the page that need tooltips, if you use data-bs-title="...", only the title will be displayed at the first place. Then I checked Google and found no answer. When I When I was about to give up, I checked W3C, according to their usage, use title="...". All titles can be displayed, I guess it's a documentation error!

const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Tooltip on top">
  Tooltip on top
</button>

Reduced test cases

---
layout: default
title: 1
pagination:
 enabled: true
---
<div class="container">
    {% for post in paginator.posts %}
    <blockquote class="border-start border-2 border-info shadow bg-body rounded-bottom ">
        <a class="fs-5 btn btn-outline-dark border border-0 " href="{{ post.url }}">{{ post.title }}</a>
        
            <i class="bi bi-alarm text-success" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ post.date | date: '%F' }}"> </i>
        
        <button type="button" class="btn btn-none" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ post.author | upcase }}">
            <i class="bi bi-person-circle"></i>
        </button>
        <ul class="list-unstyled p-4 bg-light bg-gradient">
            <li class="">{{ post.excerpt | strip_html | truncate: 100 }}</li>
        </ul>
    </blockquote>
    {% endfor %}
</div>
{% if paginator.total_pages > 1 %}
<ul>
    {% if paginator.previous_page %}
    <li>
        <a href="{{ paginator.previous_page_path | prepend: site.baseurl }}">Newer</a>
    </li>
    {% endif %}
    {% if paginator.next_page %}
    <li>
        <a href="{{ paginator.next_page_path | prepend: site.baseurl }}">Older</a>
    </li>
    {% endif %}
</ul>
{% endif %}
<script type="text/javascript">
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl,{delay: { "show": 500, "hide": 100 }}))
</script>

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome, Microsoft Edge

What version of Bootstrap are you using?

v5.2.2

video

if use data-bs-title

https://user-images.githubusercontent.com/58632405/208236164-47e8cadb-3c29-47e9-a088-2950d9376551.mp4

if use title

https://user-images.githubusercontent.com/58632405/208236082-91de1259-4325-4951-9cc2-f5254273327a.mp4

Assignee
Assign to
Time tracking