codex-team / codex-team/editor.js
[Bug]Inline tool active state becomes deactivated
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
When you use multiple inline tool on a selection, it will nest the HTML tag. When you remove the first (Outer) HTML tag, checkState will only check the parent from the current cursor position when using findParentTag and does not look into the child which is also within that selection. Thus, the inline toolbar removes the active state of the other tool as well.
Steps to reproduce:
1. Go to the demo at https://editorjs.io/
2. Select a range of text
3. Click on inline code tool
4. Click on marker tool (Do not deselect the text)
5. Click on inline code tool again (Do not deselect the text)
6. You will notice that the marker tool also became inactive but it is suppose to continue to show active
Expected behavior:
All applied inline tool should still show correctly based on selection. The Bold and Italic is showing correctly because it is using a deprecated method queryCommandState while the new tools are using findParentTag which only traverse upwards which I believe is the problem
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.