Inline link tool interaction with other inline tools is broken
First Issue
Steps to reproduce:
- Write text
- Add inline tag (ie.
b) for this text - Add link for this text
Expected behavior:
- Link tag should not destroy actual inline tags.
- Link should be added inside
Recording:
Second Issue
Steps to reproduce:
- Write text
- Add link tag for this text
- Add inline tag for some part of the link
Expected behavior:
- Tag should be added only in part of the link (now it destroys every inline tags in text)
Recording:
Setup
Device, Browser, OS: Chromium 131
Editor.js version: From the website and also ocurr locally on 2.30.6
Plugins you use with their versions: Link doesnt work with built in inline and everyting from https://github.com/natterstefan/editorjs-inline-tool/tree/master
Yes we're also experiencing this issue. It was working in v2.29.1, so from what I can tell it's been broken since the very next release which was v2.30.0.
This appears to be related to the introduction of nested popover support in v2.30. The Link inline tool is now treated as a nestedPopoverTriggerItem, likely because it includes its own input field for entering a URL:
https://github.com/codex-team/editor.js/blob/next/src/components/utils/popover/popover-inline.ts#L172
Because of this, when a user switches to another inline tool (e.g., bold or italic), the handleItemClick logic seems to trigger the Links inline button click (toggle) event again. This results in the anchor tag being removed unexpectedly:
https://github.com/codex-team/editor.js/blob/next/src/components/inline-tools/inline-tool-link.ts#L176
@TatianaFomina Would you be able to provide any insight into this behavior?
@LegendMike-Pollard I'm also experiencing this issue with editorjs 2.29. I'm not even able to set a whole link italic/bold.
I can confirm the issue.