codex-team / codex-team/editor.js
[Bug] focused/selected state of blocks resets automatically when pressing outside of editor's main wrapper DIV
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Hi there,
I'm building an editor based on this awesome text editor (Editor JS),
I built an external toolbar with functions affecting editor's text blocks,
my external toolbar "lives" outside of Editor JS root wrapper
(I'm referring to the div with "codex-editor codex-editor--narrow" class as Editor JS root wrapper)
my problem is that every click outside of the Editor JS's root wrapper resets all blocks state,
it removes the "ce-block--focused" and "ce-block--selected" classes from the relevant blocks.
Steps to reproduce:
- go to editors instance
- click on any text block (this action will add "ce-block--focused" class to block)
- or use the cursor to select few blocks (this action will add "ce-block--selected" class to all of the blocks you've selected)
- click anywhere outside of Editor JS root wrapper
Editor.js version: latest
Device, Browser, OS: chrome, firefox, safari
I'm not sure that it is a bug but for my purposes and use that behavior act as a bug.
Any kind of help solving this issue one way or another will be appreciated! thanks:)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.