Although we have the “default other external links in new tab” setting enabled, new posts with links do not default to a blank target as expected, but rather open in the same tab.
That isn’t how that feature works. It doesn’t put target="_blank"
on the link. It is handled by the click-tracker, which receives the mouse click event and processes it.
Relevant code:
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/lib/click-track.js.es6#L122-L128
8 Likes
Also note that users can change the behavior in their preferences.
3 Likes
This topic was automatically closed after 2804 days. New replies are no longer allowed.