mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
click-track was relying on `e.currentTarget`, which may not be the
actual link in a vanilla-js event. It worked in JQuery because listeners
could be set with filters like `"a"`, and `currentTarget` would be set
accordingly. But in vanilla JS, `currentTarget` is the wrapper element
with the event-listener attached.
Instead, we can use `event.target.closest("a")` to find the actual link
element.
|
||
|---|---|---|
| .. | ||
| asset-processor | ||
| deprecation-silencer | ||
| discourse | ||
| discourse-i18n | ||
| discourse-markdown-it | ||
| discourse-types | ||
| pretty-text | ||
| .npmrc | ||
| polyfills.js | ||