Skip to content

Commit

Permalink
Fix disabled element tooltip stackblitz (#38623)
Browse files Browse the repository at this point in the history
* Load js for disabled button tooltip stackblitz

* Remove surrounding useless `<div>`

---------

Co-authored-by: Julien Déramond <juderamond@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
  • Loading branch information
3 people committed May 31, 2023
1 parent 9cc85fd commit 0d9715e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions site/content/docs/5.3/components/tooltips.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,11 @@ The required markup for a tooltip is only a `data` attribute and `title` on the

Elements with the `disabled` attribute aren't interactive, meaning users cannot focus, hover, or click them to trigger a tooltip (or popover). As a workaround, you'll want to trigger the tooltip from a wrapper `<div>` or `<span>`, ideally made keyboard-focusable using `tabindex="0"`.

<div class="tooltip-demo">
{{< example >}}
{{< example class="tooltip-demo" stackblitz_add_js="true" >}}
<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" data-bs-title="Disabled tooltip">
<button class="btn btn-primary" type="button" disabled>Disabled button</button>
</span>
{{< /example >}}
</div>

### Options

Expand Down

0 comments on commit 0d9715e

Please sign in to comment.