mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-14 18:42:30 +03:00
Remove element event listeners through base component (#33429)
After some research, I found out that EventHandler saves all the custom events per element using namespace, and is capable of removing handlers using only the element and its namespace (`DATA_KEY`). So, probably is better to utilize the base-component to do the same job.
This commit is contained in:
+1
-1
@@ -187,7 +187,7 @@ class Modal extends BaseComponent {
|
||||
}
|
||||
|
||||
dispose() {
|
||||
[window, this._element, this._dialog]
|
||||
[window, this._dialog]
|
||||
.forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY))
|
||||
|
||||
super.dispose()
|
||||
|
||||
Reference in New Issue
Block a user