ueberdosis / tiptap

The headless rich text editor framework for web artisans.
https://tiptap.dev
MIT License
27.38k stars 2.27k forks source link

[Bug]: Pasting link from Mouse is not working #5098

Open rakesh-splose opened 6 months ago

rakesh-splose commented 6 months ago

Which packages did you experience the bug in?

@tiptap/extension-link

What Tiptap version are you using?

2.1.13

What’s the bug you are facing?

Pasting link from Mouse is not working. It is working fine through keyboard but not from mouse paste.

What browser are you using?

Chrome

Code example

No response

What did you expect to happen?

Pasting link from Mouse is not working. It is expected to work in similar way as it is working with keyboard paste.

Anything to add? (optional)

Thank you

Did you update your dependencies?

Are you sponsoring us?

screensaversclub commented 6 months ago

When you mentioned mouse paste, are you referring to right click -> paste where the paste content contains a link? I tried this in both the cypress test and on one of my live (production) instances of TipTap, both work fine for me.

rakesh-splose commented 6 months ago

Thank you for considering it

Issue is when you copy any url from browser taskbar and paste through mouse right click. Pasting through keyboard will work fine.

Nantris commented 6 months ago

@rakesh-splose I can't reproduce this. Is there any error in the console? Can you provide a video? I can't think how this might be caused.

rakesh-splose commented 5 months ago

Hi,

Can you please try on this official link - https://tiptap.dev/docs/editor/api/marks/link

Whenever you copy the url from toolbar, and paste it with ctrl+v (keyboard), it will work fine. But if you copy the url from the toolbar and paste it through the mouse by right clicking the menu, It will not work.

On Fri, May 3, 2024 at 6:20 AM Nantris @.***> wrote:

@rakesh-splose https://github.com/rakesh-splose I can't reproduce this. Is there any error in the console? Can you provide a video? I can't think how this might be caused.

— Reply to this email directly, view it on GitHub https://github.com/ueberdosis/tiptap/issues/5098#issuecomment-2091531306, or unsubscribe https://github.com/notifications/unsubscribe-auth/BD75JOPAXJQJ2KKERAARIUTZAKRJ3AVCNFSM6AAAAABGZ5UW5GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJRGUZTCMZQGY . You are receiving this because you were mentioned.Message ID: @.***>

-- Rakesh Soni Software Engineer *E: @. @.>*

Lot Fourteen, North Terrace Adelaide SA 5000 splose.com

screensaversclub commented 5 months ago

This is a screen recording of me trying it on the official link It works for me: https://github.com/ueberdosis/tiptap/assets/67162738/fd56bf30-e385-4482-bf3c-09ab3a0b368e

Perhaps you can consider recording a screen recording to show the issue better.

You could also try testing this in a private window (with browser extensions disabled) to see if that helps resolve the issue.

rakesh-splose commented 4 months ago

Issue is with chrome browser in Mac. Working fine on safari. Is it fixable?

Nantris commented 4 months ago

Unfortunately the example embeds in the docs appear to be down but I'll try to confirm this tomorrow.

Nantris commented 4 months ago

Very strange issue, but confirmed it's real. Only affects macOS as far as I can tell. No console messages, but probably expected since the editor is inside an iframe.

@rakesh-splose do you get any console messages or any other hints what might be going wrong?

I tested on a few other editors and I noticed that playground.lexical.dev has a seemingly related issue. If you paste at the end of the line in a list, it eats the linebreak, which does not occur on Linux/Windows. Perhaps a hint as to the underlying issue?