mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 13:29:06 +02:00
tooltip dispose:removing only own event handler (#28896)
This commit is contained in:
committed by
Johann-S
parent
2ac2a5a91e
commit
0829decce0
@@ -237,7 +237,7 @@ class Tooltip {
|
|||||||
Data.removeData(this.element, this.constructor.DATA_KEY)
|
Data.removeData(this.element, this.constructor.DATA_KEY)
|
||||||
|
|
||||||
EventHandler.off(this.element, this.constructor.EVENT_KEY)
|
EventHandler.off(this.element, this.constructor.EVENT_KEY)
|
||||||
EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal')
|
EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler)
|
||||||
|
|
||||||
if (this.tip) {
|
if (this.tip) {
|
||||||
this.tip.parentNode.removeChild(this.tip)
|
this.tip.parentNode.removeChild(this.tip)
|
||||||
@@ -558,13 +558,15 @@ class Tooltip {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
EventHandler.on(SelectorEngine.closest(this.element, '.modal'),
|
this._hideModalHandler = () => {
|
||||||
'hide.bs.modal',
|
|
||||||
() => {
|
|
||||||
if (this.element) {
|
if (this.element) {
|
||||||
this.hide()
|
this.hide()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EventHandler.on(SelectorEngine.closest(this.element, '.modal'),
|
||||||
|
'hide.bs.modal',
|
||||||
|
this._hideModalHandler
|
||||||
)
|
)
|
||||||
|
|
||||||
if (this.config.selector) {
|
if (this.config.selector) {
|
||||||
|
Reference in New Issue
Block a user