mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 13:29:06 +02: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:
@@ -215,7 +215,6 @@ class Tooltip extends BaseComponent {
|
||||
dispose() {
|
||||
clearTimeout(this._timeout)
|
||||
|
||||
EventHandler.off(this._element, this.constructor.EVENT_KEY)
|
||||
EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)
|
||||
|
||||
if (this.tip && this.tip.parentNode) {
|
||||
|
Reference in New Issue
Block a user