1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 13:29:06 +02:00

handle detached tooltip when we try to hide a modal

This commit is contained in:
Johann-S
2018-11-02 10:24:35 +01:00
parent e0d1f3f18b
commit f7a4b39767
2 changed files with 67 additions and 5 deletions

View File

@@ -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,