Open timfuhrmann opened 1 year ago
Hello everyone!
This bug is happening to me as well.
Even by simply running editor.chain().focus().extendMarkRange('link').run()
you can see how it's behaving.
If the selection only contains part of the text but not the first character, it works perfectly. If the selection contains the first character (it doesn't need to be only the first character) but isn't the entire link range, it doesn't extend the selection.
I hope this information helps you to find the root cause :)
Which packages did you experience the bug in?
react, extension-link
What Tiptap version are you using?
2.0.4
What’s the bug you are facing?
Selecting the first character of a link and calling
extendMarkRange("link").unsetLink().run()
will only unset the link for the first character - selecting any other character and calling said chain of functions will completely remove the link, as expected. Same behavior for other extensions like bold or italic - it seems thatextendMarkRange
is not working properly selecting the first character only.What browser are you using?
Chrome
Code example
https://codesandbox.io/s/laughing-ardinghelli-g255xt?file=/src/App.js
What did you expect to happen?
Since
extendMarkRange
is being called the link should be remove completely.Anything to add? (optional)
How To Reproduce
unsetLink
Did you update your dependencies?
Are you sponsoring us?