diff options
| author | Johann-S <[email protected]> | 2018-11-02 10:24:35 +0100 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2018-11-02 13:39:58 +0100 |
| commit | f7a4b3976789f1e96bad43ca561ef461f22d6be4 (patch) | |
| tree | bad47aa2083f60e531b6503b7f593b484dbcb12b /js/src/tooltip.js | |
| parent | e0d1f3f18b93c125581c6d941c0e4248dbbc835f (diff) | |
| download | bootstrap-f7a4b3976789f1e96bad43ca561ef461f22d6be4.tar.xz bootstrap-f7a4b3976789f1e96bad43ca561ef461f22d6be4.zip | |
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 3d3130bb5..cf8b8e118 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, |
