Fixed Cannot open images embedded via [ATTACH type="full"] in new browser tab

Affected version
2.1.11 and 2.2.0 RC1


Well-known member
Images embedded in a forum post can always be enlarged by clicking them. However, opening them in a new tab (middle click or context menu entry "Open link in new tab") is only possible if the ATTACH bbcode doesn't use type="full".

[ATTACH type="full"]235143[/ATTACH]: Cannot open in new tab.

[ATTACH type="full" width="578px"]235143[/ATTACH]: Cannot open in new tab (although to the user it looks exactly like the next example).

[ATTACH]235143[/ATTACH]: Can open in new tab.

In particular, the last two examples look identical to the user but one of them can be opened in a new tab while the other cannot.

Is this something that can be fixed?


Well-known member
I just noticed that this issue is partially fixed in XenForo 2.2.0 RC1. The first two examples cannot be opened via middle click but their context menu now has an entry "Open image in new tab".

Maybe you could make the solution perfect by wrapping the image in an anchor element to enable middle clicks as well?

Chris D

XenForo developer
Staff member
It is correct that this wouldn't have worked in XF 2.1.

There have been no relevant changes since the XF 2.2 beta 1 so I think the context menu approach will have always worked.

Cmd/Ctrl + Click seems to work for opening in a new window because we specifically handle meta key + click. We may need to do something specific to handle middle click.

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.0 RC2).

Change log:
Allow middle click to open lightbox images in a new tab.
There may be a delay before changes are rolled out to the XenForo Community.