mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Hide popovers when their containing modal is closed. (#21227)
This commit is contained in:
parent
f2bc3bec7c
commit
535fec93cf
1 changed files with 6 additions and 0 deletions
|
@ -224,6 +224,7 @@ const Tooltip = (($) => {
|
|||
$.removeData(this.element, this.constructor.DATA_KEY)
|
||||
|
||||
$(this.element).off(this.constructor.EVENT_KEY)
|
||||
$(this.element).closest('.modal').off('hide.bs.modal')
|
||||
|
||||
if (this.tip) {
|
||||
$(this.tip).remove()
|
||||
|
@ -454,6 +455,11 @@ const Tooltip = (($) => {
|
|||
(event) => this._leave(event)
|
||||
)
|
||||
}
|
||||
|
||||
$(this.element).closest('.modal').on(
|
||||
'hide.bs.modal',
|
||||
() => this.hide()
|
||||
)
|
||||
})
|
||||
|
||||
if (this.config.selector) {
|
||||
|
|
Loading…
Add table
Reference in a new issue