element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.19k stars 2k forks source link

matrix.to links generated in a code block navigate away from the page #3681

Closed turt2live closed 2 years ago

turt2live commented 7 years ago

Description

This is an awkward case. Room aliases automatically get converted to matrix.to links in Riot, however if that alias is in a code block, the link doesn't stay on the page and instead throws you over to matrix.to. This used to work just fine, and kinda makes linking markdown-affected rooms a little annoying.

Steps to reproduce

I would have expected that the link work like they do outside of code blocks: bring me to the room, not the matrix.to page.

Log: sent (ticket referenced as github link in description)

Version information

t3chguy commented 7 years ago

From a little debugging it looks like linkify attaches a local click event handler to it then it being mangled by something removes this handler

turt2live commented 7 years ago

This got fixed, somehow

turt2live commented 6 years ago

Reopening, just experienced this on /develop with a code block as follows:

#linux_gaming:matrix.org

The linkifier caught it and made it a matrix.to link, which navigates you away.

turt2live commented 6 years ago

and no longer an issue. This is somewhat screaming to be a test case.

Half-Shot commented 5 years ago

This is still an issue, ex: https://matrix.to/#/!QtykxKocfZaZOUrTwp:matrix.org/$15528445031027051zpSsW:matrix.org?via=matrix.org&via=half-shot.uk&via=linuxgaming.life

turt2live commented 2 years ago

Fixed