WIP: Bricks doesn't respect "Open external links in new tabs" setting by Rank Math or ASE

Browser: Brave 138.1.80.113
OS: Linux Mint 22.1 Cinnamon
URL: https://haug-final.2sinn.dev

Steps to Reproduce:

  1. Install Rank Math and/or ASE
  2. Build a page in Bricks that contains e.g. a text link or button leading to something external like https://www.youtube.com/watch?v=dQw4w9WgXcQ
  3. In Rank Math > General Settings > Links, select “Open External Links in New Tab/Window” at the end
  4. Click on the external link on the front end
  5. Disable the Rank Math option and set it in Admin and Site Enhancements > Content Management > “Open All External Links in New Tab”
  6. Repeat step 4

Both Rank Math and Admin and Site Enhancements (ASE) offer settings to make external links always open in new tabs. With a Bricks-built website, these do nothing. Unless one manually sets the “Open in New Tab” flag on the element in the builder, external links open in the same tab.

On the example website I linked at the beginning above, I used a JS snippet from this Facebook conversation:

If one removes that snippet and sets the option in RM or ASE, the “Termin online buchen” button in the front page hero will open in the same tab.

Hi Matt,
Thanks so much for your report!

This problem has been known for some time. Instead of using the “open external link” settings of plugin x or y, we already have an improvement task on our to-do list to implement this setting natively in Bricks. It’s only a matter of time before it’s implemented :crossed_fingers:

Best regards,
timmse

2 Likes

Love it! I look forward to having the fix. In the meantime, the JS snippet from the Facebook post does the trick for me. :slight_smile:

@timmse. Awesome, perhaps an option for popular document types could also be included. Open all PDFs in new tabs for instance.