1
0
Fork 0
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:
Bardi Harborow 2016-11-30 04:45:14 +11:00 committed by Mark Otto
parent f2bc3bec7c
commit 535fec93cf

View file

@ -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) {