FIX: Add bookmark-list component (PR #10451)

Moving the bookmark list into its own component to solve click binding issues for external links, because controllers are not the place for DOM manipulation!


I would wrap this into something like this:

<div {{on "click" this.openBookmark}}>
  {{topic-link bookmark}}

And then you could refactor the component to only need this:

  openBookmark(event) {
    let link =;

    if (shouldOpenInNewTab(link.href)) {

This is a little bit annoying and I would prefer if we could have a way to intercept at topic-link level, but that should do the job correctly, and is a lot less code than what you have.

Maybe a followup PR could be to improve topic-link to support opening in new tab.

can’t you just do:



@jjaffeux the problem here is links appearing in the excerpt a few lines down, not the topic-link. The topic link is never an external link so that “open external links in new tab” preference will not affect them. However this could work for the wrapper around excerpt so I’ll try that!

Ah…could have sworn I tried that. Thank you!

This pull request has been mentioned on Discourse Meta. There might be relevant details there: