Properly unload scroll listener when unloading a select [SCI-8802]

This commit is contained in:
Martin Artnik 2023-07-06 10:31:26 +02:00
parent c8c0a147b5
commit ed4af7ae26

View file

@ -62,7 +62,10 @@
},
mounted() {
this.focusElement.onblur = this.blur;
document.addEventListener("scroll", this.updateOptionPosition);
document.addEventListener('scroll', this.updateOptionPosition);
},
beforeDestroy() {
document.removeEventListener('scroll', this.updateOptionPosition);
},
methods: {
preventBlur() {