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:
authorJohann-S <johann.servoire@gmail.com>2018-11-02 12:24:35 +0300
committerJohann-S <johann.servoire@gmail.com>2018-11-02 15:39:58 +0300
commitf7a4b3976789f1e96bad43ca561ef461f22d6be4 (patch)
treebad47aa2083f60e531b6503b7f593b484dbcb12b /js/src/tooltip.js
parente0d1f3f18b93c125581c6d941c0e4248dbbc835f (diff)
handle detached tooltip when we try to hide a modal
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r--js/src/tooltip.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index 3d3130bb5b..cf8b8e1186 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -486,13 +486,17 @@ class Tooltip {
(event) => this._leave(event)
)
}
-
- $(this.element).closest('.modal').on(
- 'hide.bs.modal',
- () => this.hide()
- )
})
+ $(this.element).closest('.modal').on(
+ 'hide.bs.modal',
+ () => {
+ if (this.element) {
+ this.hide()
+ }
+ }
+ )
+
if (this.config.selector) {
this.config = {
...this.config,