Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/src/tooltip.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 505f8c8532..2a55992cba 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -578,14 +578,11 @@ class Tooltip {
}
_fixTitle() {
- const titleType = typeof this.element.getAttribute('data-bs-original-title')
-
- if (this.element.getAttribute('title') || titleType !== 'string') {
- this.element.setAttribute(
- 'data-bs-original-title',
- this.element.getAttribute('title') || ''
- )
+ const title = this.element.getAttribute('title')
+ const originalTitleType = typeof this.element.getAttribute('data-bs-original-title')
+ if (title || originalTitleType !== 'string') {
+ this.element.setAttribute('data-bs-original-title', title || '')
this.element.setAttribute('title', '')
}
}