FIX: A paste event listener was re-added instead of being removed

FIX: A paste event listener was re-added instead of being removed

cc: @eviltrout :wink:

diff --git a/app/assets/javascripts/discourse/app/components/user-selector.js b/app/assets/javascripts/discourse/app/components/user-selector.js
index a340b27..b97788f 100644
--- a/app/assets/javascripts/discourse/app/components/user-selector.js
+++ b/app/assets/javascripts/discourse/app/components/user-selector.js
@@ -43,7 +43,7 @@ export default TextField.extend({
   @on("willDestroyElement")
   _destroyAutocompleteInstance() {
     $(this.element).autocomplete("destroy");
-    this.element.addEventListener("paste", this._paste);
+    this.element.removeEventListener("paste", this._paste);
   },
 
   @on("didInsertElement")

GitHub sha: 6287c8e1

1 Like

d’oh