mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Tooltip: Destroy $tip, $arrow, $viewport to avoid memory leak
Closes #16039.
This commit is contained in:
parent
09f98453ce
commit
7429fc7ff9
@ -440,6 +440,12 @@
|
|||||||
clearTimeout(this.timeout)
|
clearTimeout(this.timeout)
|
||||||
this.hide(function () {
|
this.hide(function () {
|
||||||
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
that.$element.off('.' + that.type).removeData('bs.' + that.type)
|
||||||
|
if (that.$tip) {
|
||||||
|
that.$tip.detach()
|
||||||
|
}
|
||||||
|
that.$tip = null
|
||||||
|
that.$arrow = null
|
||||||
|
that.$viewport = null
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user