diff options
author | GeoSot <geo.sotis@gmail.com> | 2021-05-11 09:04:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 09:04:42 +0300 |
commit | 03842b5f259d6007db02c465e6c55929e551e9cd (patch) | |
tree | b5ec0345127f40dd0918ef6828c3057ca57a4c3a /js/src/modal.js | |
parent | 052def456845c2147e4e6c99d17bba12fcbee34c (diff) |
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 .
Diffstat (limited to 'js/src/modal.js')
-rw-r--r-- | js/src/modal.js | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index 6701c896f7..44f2a0cbb2 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -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() { |