codex-team / codex-team/editor.js
The whole inline-toolbar recreates itself endlessly when opening link-toolbar
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
It's a very strange bug which becomes quite obvious and visible if you add a bit of transitions to the .ce-toolbar__content. For some reason if you open link-submenu the whole inline-toolbar gets recreated and repopulated endlessly until you click on an input element (make it focused). It doesn't happen on link creation because then the input gets focused initially, but when you try to edit a link, that's when the input doesn't get focused and the whole bug begins. At least, that's what I presumed at first but then I discovered that you can click anywhere inside the inline toolbar (not only input) and the vigorous recreation stops.
**Steps to reproduce:**
1. Type some text
2. Select some parts of it and turn it into a link
3. Close the inline toolbar
4. Double click on the created link to open the inline toolbar
**Expected behavior:**
1. The inline toolbar elements should be created only once (at the init of editorjs or when you open the inline toolbar)
2. It should work properly with transitions and animations to allow for open and close animations
**You can see the bug in action here:**
https://github.com/user-attachments/assets/9c773f95-1f0f-4285-ad38-3c4a93dd8d3b
**OS:** Window 11
**Browser:** Google Chrome 128.0.6613.114
**Editor.js version:** 2.30.5
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.