mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 05:19:15 +02:00
Change element.parentNode.removeChild(element)
to element.remove()
(#34071)
This commit is contained in:
@@ -208,8 +208,8 @@ class Tooltip extends BaseComponent {
|
||||
|
||||
EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)
|
||||
|
||||
if (this.tip && this.tip.parentNode) {
|
||||
this.tip.parentNode.removeChild(this.tip)
|
||||
if (this.tip) {
|
||||
this.tip.remove()
|
||||
}
|
||||
|
||||
if (this._popper) {
|
||||
@@ -314,8 +314,8 @@ class Tooltip extends BaseComponent {
|
||||
return
|
||||
}
|
||||
|
||||
if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip)
|
||||
if (this._hoverState !== HOVER_STATE_SHOW) {
|
||||
tip.remove()
|
||||
}
|
||||
|
||||
this._cleanTipClass()
|
||||
|
Reference in New Issue
Block a user