DEV: removes jquery usage from html-with-links (#14966)

DEV: removes jquery usage from html-with-links (#14966)

diff --git a/app/assets/javascripts/discourse/app/components/html-with-links.js b/app/assets/javascripts/discourse/app/components/html-with-links.js
index d14b7dc..a49b1df 100644
--- a/app/assets/javascripts/discourse/app/components/html-with-links.js
+++ b/app/assets/javascripts/discourse/app/components/html-with-links.js
@@ -5,19 +5,11 @@ import {
 import Component from "@ember/component";
 
 export default Component.extend({
-  didInsertElement() {
-    this._super(...arguments);
-    $(this.element).on("click.discourse-open-tab", "a", (event) => {
-      if (event.target && event.target.tagName === "A") {
-        if (shouldOpenInNewTab(event.target.href)) {
-          openLinkInNewTab(event.target);
-        }
+  click(event) {
+    if (event?.target?.tagName === "A") {
+      if (shouldOpenInNewTab(event.target.href)) {
+        openLinkInNewTab(event.target);
       }
-    });
-  },
-
-  willDestroyElement() {
-    this._super(...arguments);
-    $(this.element).off("click.discourse-open-tab", "a");
+    }
   },
 });

GitHub sha: f9682f1c69daf7a70606365d8d6c6f7b655f7fe7

This commit appears in #14966 which was approved by CvX. It was merged by jjaffeux.