mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-26 06:44:35 +02:00
Refactor: move disposing properties into the base class (#33740)
Moves more functionality to `base-component`, transferring the responsibility of disposal to parent class. Each component, dusting disposal, sets its protected properties to `null`. So the same can be done in one place for all children components .
This commit is contained in:
@@ -183,6 +183,7 @@ class Modal extends BaseComponent {
|
||||
[window, this._dialog]
|
||||
.forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY))
|
||||
|
||||
this._backdrop.dispose()
|
||||
super.dispose()
|
||||
|
||||
/**
|
||||
@@ -191,14 +192,6 @@ class Modal extends BaseComponent {
|
||||
* It will remove `EVENT_CLICK_DATA_API` event that should remain
|
||||
*/
|
||||
EventHandler.off(document, EVENT_FOCUSIN)
|
||||
|
||||
this._config = null
|
||||
this._dialog = null
|
||||
this._backdrop.dispose()
|
||||
this._backdrop = null
|
||||
this._isShown = null
|
||||
this._ignoreBackdropClick = null
|
||||
this._isTransitioning = null
|
||||
}
|
||||
|
||||
handleUpdate() {
|
||||
|
Reference in New Issue
Block a user