mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-13 09:04:14 +02:00
Hide popovers when their containing modal is closed. (#21227)
This commit is contained in:
committed by
Mark Otto
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) {
|
||||||
|
Reference in New Issue
Block a user