mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
Hide popovers when their containing modal is closed. (#21227)
This commit is contained in:
parent
f2bc3bec7c
commit
535fec93cf
@ -224,6 +224,7 @@ const Tooltip = (($) => {
|
|||||||
$.removeData(this.element, this.constructor.DATA_KEY)
|
$.removeData(this.element, this.constructor.DATA_KEY)
|
||||||
|
|
||||||
$(this.element).off(this.constructor.EVENT_KEY)
|
$(this.element).off(this.constructor.EVENT_KEY)
|
||||||
|
$(this.element).closest('.modal').off('hide.bs.modal')
|
||||||
|
|
||||||
if (this.tip) {
|
if (this.tip) {
|
||||||
$(this.tip).remove()
|
$(this.tip).remove()
|
||||||
@ -454,6 +455,11 @@ const Tooltip = (($) => {
|
|||||||
(event) => this._leave(event)
|
(event) => this._leave(event)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(this.element).closest('.modal').on(
|
||||||
|
'hide.bs.modal',
|
||||||
|
() => this.hide()
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.config.selector) {
|
if (this.config.selector) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user