diff options
author | Johann-S <johann.servoire@gmail.com> | 2018-11-02 12:24:35 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2018-11-02 15:39:58 +0300 |
commit | f7a4b3976789f1e96bad43ca561ef461f22d6be4 (patch) | |
tree | bad47aa2083f60e531b6503b7f593b484dbcb12b /js/src/tooltip.js | |
parent | e0d1f3f18b93c125581c6d941c0e4248dbbc835f (diff) |
handle detached tooltip when we try to hide a modal
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r-- | js/src/tooltip.js | 14 |
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, |