1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-06 13:46:42 +02:00

Handle non-empty whitespace textContent in Tooltip trigger (#36588)

This commit is contained in:
Nathan Walters
2022-07-05 22:15:50 -07:00
committed by GitHub
parent 7d0b224df4
commit 3f324eed02
2 changed files with 20 additions and 1 deletions

View File

@@ -518,7 +518,7 @@ class Tooltip extends BaseComponent {
return
}
if (!this._element.getAttribute('aria-label') && !this._element.textContent) {
if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {
this._element.setAttribute('aria-label', title)
}