# External link target setting not being respected

**URL:** https://meta.discourse.org/t/external-link-target-setting-not-being-respected/51053
**Category:** Support
**Created:** [04.Октябрь.2016 06:36:57 UTC](https://meta.discourse.org/t/external-link-target-setting-not-being-respected/51053 "2016-10-04T06:36:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![DanielMarquard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danielmarquard/32/74010_2.png) [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)
#### Post date: [04.Октябрь.2016 06:36:57 UTC](https://meta.discourse.org/t/external-link-target-setting-not-being-respected/51053/1 "2016-10-04T06:36:57Z")

</div>

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.

 ![](https://global.discourse-cdn.com/meta/original/3X/6/6/6656a24c0262685ba4ced276282227f7662e40b9.PNG)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [04.Октябрь.2016 10:10:31 UTC](https://meta.discourse.org/t/external-link-target-setting-not-being-respected/51053/2 "2016-10-04T10:10:31Z")

</div>

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](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/lib/click-track.js.es6#L122-L128)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [04.Октябрь.2016 14:44:05 UTC](https://meta.discourse.org/t/external-link-target-setting-not-being-respected/51053/3 "2016-10-04T14:44:05Z")

</div>

Also note that users can change the behavior in their preferences.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [08.Июнь.2024 12:45:12 UTC](https://meta.discourse.org/t/external-link-target-setting-not-being-respected/51053/4 "2024-06-08T12:45:12Z")

</div>

Эта тема была автоматически закрыта через 2804 дня. Новые ответы больше не допускаются.
