aboutsummaryrefslogtreecommitdiff
path: root/js/src/modal.js
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2020-11-20 11:13:11 +0100
committerXhmikosR <[email protected]>2020-11-29 20:58:26 +0200
commit9eb9d02084dc914e614e8844e3ffdee4d0a25126 (patch)
tree4c6722f81a9336921b85879aff41bc748ff12a2b /js/src/modal.js
parent51a208f119522f8618801a6e61ff8d47cf89d4cf (diff)
downloadbootstrap-9eb9d02084dc914e614e8844e3ffdee4d0a25126.tar.xz
bootstrap-9eb9d02084dc914e614e8844e3ffdee4d0a25126.zip
add dispose in base component
Diffstat (limited to 'js/src/modal.js')
-rw-r--r--js/src/modal.js5
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