lemmy-ui
lemmy-ui copied to clipboard
Unwanted markdown is inserted when pasting an URL to edit a link
Requirements
- [X] This is a bug report, and if not, please post to https://lemmy.ml/c/lemmy_support instead.
- [X] Please check to see if this issue already exists.
- [X] It's a single bug. Do not report multiple bugs in one issue.
- [X] It's a frontend issue, not a backend issue; Otherwise please create an issue on the backend repo instead.
Summary
When editing a comment, highlighting a link target and pasting an URL to replace it inserts unwanted markdown instead of the inserting the URL.
If the user doesn't notice, the result is a garbage link.
If they do notice, they then have to painstakingly select and delete the automatically inserted markdown in order to correct the damage. (This is especially tiresome with long URLs.)
Steps to Reproduce
- Submit a comment with a markdown url
[like this](https://example.com/)
. - Copy a different URL to the clipboard.
- Edit the comment.
- Select the original URL.
- Paste over the original URL.
The actual result:
[like this]([https://example.com/](https://example.net/))
The expected result:
[like this](https://example.net/)
Technical Details
This smells like #2116 / #2141 in action. I wish I could turn it off. IMHO, corrupting user input when the user didn't request it is a terrible idea.
Tested on Firefox, though I don't imagine the browser makes a difference.
Lemmy Instance Version
BE: 0.19.3
Lemmy Instance URL
https://lemmy.ca/