0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 16:54:24 +01:00

Fix disabled element tooltip stackblitz (#38623)

* 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>
This commit is contained in:
Ian Haggerty 2023-05-31 00:40:38 -04:00 committed by GitHub
parent 9cc85fd69b
commit 0d9715e063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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