DEV: Ensure scrolling-post-stream event listeners are removed correctly (#15115)

The method was switched from _debouncedScrollCallback to _debouncedScroll in ff72522f, but the cleanup was not updated to match.
This commit is contained in:
David Taylor 2021-11-27 17:04:31 +00:00 committed by GitHub
parent 1b184cefd0
commit 136189508b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -365,8 +365,8 @@ export default MountWidget.extend({
willDestroyElement() { willDestroyElement() {
this._super(...arguments); this._super(...arguments);
document.removeEventListener("touchmove", this._debouncedScrollCallback); document.removeEventListener("touchmove", this._debouncedScroll);
window.removeEventListener("scroll", this._debouncedScrollCallback); window.removeEventListener("scroll", this._debouncedScroll);
this.appEvents.off("post-stream:refresh", this, "_debouncedScroll"); this.appEvents.off("post-stream:refresh", this, "_debouncedScroll");
$(this.element).off("mouseenter.post-stream"); $(this.element).off("mouseenter.post-stream");
$(this.element).off("mouseleave.post-stream"); $(this.element).off("mouseleave.post-stream");