In the composer, moving links with/out text strips most of the link

I just noticed earlier white typing a message here.

  • Select a link with/out following text (the selection must start with a link)
  • Try moving it in another place
  • Result: Most of the link is gone.

1 Like

What browser is this on? Does this repro on all browsers?

I’m sorry! :pray: I should have tested on other browsers. Context is always important in a bug report; I will be careful next time.

It was on Chrome (no extension loaded)

A quick test on Firefox, it doesn’t happen.
Other browsers, such as Edge, Brave, Opera, Arc - it does happen. They are all chromium-based, though.

I can’t test on Safari right now.

Have you tried in a TEXTAREA that is not in Discourse?

Oh, that’s interesting. :thinking:

At first, I tried GitHub to comment on a random PR, but it didn’t happen.

Then, I create a basic HTML file with only a TEXTAREA and it does happen.

So, I guess there is natively an issue with chromium ; I did search a little but could not find anything yet. I will see tomorrow if I can figure out more details.

1 Like

I investigated a little more. (ahah, I forgot I started draft one month ago)

This is a very old bug reported in 2016 and still present in the latest version:

Basically, it would seem that selected text containing a colon (not the first character) is considered a URL by Chromium, and the left part is normalized/removed. However, in the case of a valid URL, it seems to remove the left part before the last “/” character (I could not find an issue specifically for that).

Possibly related source code:;l=164-207

Here is a demo in basic textarea:

Anyway, we can close it. Chromium does crazy things. :+1:

1 Like