diff options
| author | Johann-S <[email protected]> | 2020-11-20 11:13:11 +0100 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2020-11-29 20:58:26 +0200 |
| commit | 9eb9d02084dc914e614e8844e3ffdee4d0a25126 (patch) | |
| tree | 4c6722f81a9336921b85879aff41bc748ff12a2b /js/src/modal.js | |
| parent | 51a208f119522f8618801a6e61ff8d47cf89d4cf (diff) | |
| download | bootstrap-9eb9d02084dc914e614e8844e3ffdee4d0a25126.tar.xz bootstrap-9eb9d02084dc914e614e8844e3ffdee4d0a25126.zip | |
add dispose in base component
Diffstat (limited to 'js/src/modal.js')
| -rw-r--r-- | js/src/modal.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index 1e7ce0346..449721caf 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -207,6 +207,8 @@ class Modal extends BaseComponent { [window, this._element, this._dialog] .forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY)) + super.dispose() + /** * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API` * Do not move `document` in `htmlElements` array @@ -214,10 +216,7 @@ class Modal extends BaseComponent { */ EventHandler.off(document, EVENT_FOCUSIN) - Data.removeData(this._element, DATA_KEY) - this._config = null - this._element = null this._dialog = null this._backdrop = null this._isShown = null |
