-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Pasting text with more than one link sets all links' href to the first link's href #4541
Comments
Cannot reproduce as of Likely fixed by #4523 |
I don't think so because that PR was part of the I'll try out |
@C-Hess The bug exists both in Screen.Recording.2023-10-30.at.08.27.14.mov |
Interesting, I'll take a look again, sorry. |
I see now, I mistakenly forgot to clean my build when testing. Looks like this paste handler is to blame:
It only grabs the first href of your entire clipboard payload I believe. This will have to modified to support multiple links within the same clipboard payload. It also looks like #4523 was actually not merged into the develop branch, and even if it was it looks like it has the same problem... |
Created a draft PR. need to perform further testing of side effects and write tests before publishing |
Fix there already? |
Any news about that ? |
Sorry, I'll try and wrap that PR up the next few days |
Okay let us know.
|
Can you do it? |
Published. Ready for review |
How is it? @bdbch @C-Hess @Arnaud-SR |
Any news about that ? |
any update? In version 2.2.4 it is still giving me problems @C-Hess |
Yo! Is there any ETA for this fix? |
It seems to be fixed in 2.5.4 (possibly in a previous release, I didn't bisect it) |
I'll verify soon |
I'll close this for now until it's verified - feel free to reopen if you still experience this bug. |
Which packages did you experience the bug in?
link
What Tiptap version are you using?
2.1.12
What’s the bug you are facing?
I am trying to copy-paste a piece of content that contains more than one link, and the links' text content can be interpreted as valid URLs. Below an example of such content:
--- start copying below ---
Some search engines:
--- stop copying above ---
When I copy-paste this to a TipTap editor, every link but the first one has a wrong
href
attribute - all links have ahref
attribute equal to thehref
attribute of the first link. See a screen recording below.Basically on paste, TipTap changes this:
To this:
This only happens for links whose text content is also an URL - it doesn't happen when links are for example like
[DGG](https://duckduckgo.com/)
What browser are you using?
Firefox
Code example
No response
What did you expect to happen?
I expect all links to always have the same href attribute as on the source page from which I copied them.
Anything to add? (optional)
Screen.Recording.2023-10-17.at.12.54.56.mov
I didn't prepare a CodeSandbox because this behavior can be observed right now on TipTap's official page for the link extension, as seen on the video.
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: