mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-30 15:24:08 +03:00
tooltip dispose:removing only own event handler (#28896)
This commit is contained in:
+8
-6
@@ -226,7 +226,7 @@ class Tooltip {
|
||||
$.removeData(this.element, this.constructor.DATA_KEY)
|
||||
|
||||
$(this.element).off(this.constructor.EVENT_KEY)
|
||||
$(this.element).closest('.modal').off('hide.bs.modal')
|
||||
$(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler)
|
||||
|
||||
if (this.tip) {
|
||||
$(this.tip).remove()
|
||||
@@ -535,13 +535,15 @@ class Tooltip {
|
||||
}
|
||||
})
|
||||
|
||||
this._hideModalHandler = () => {
|
||||
if (this.element) {
|
||||
this.hide()
|
||||
}
|
||||
}
|
||||
|
||||
$(this.element).closest('.modal').on(
|
||||
'hide.bs.modal',
|
||||
() => {
|
||||
if (this.element) {
|
||||
this.hide()
|
||||
}
|
||||
}
|
||||
this._hideModalHandler
|
||||
)
|
||||
|
||||
if (this.config.selector) {
|
||||
|
||||
Reference in New Issue
Block a user