Prevent click on redactor from inserting new block
I have a situation where the codex-editor__redactor div is full width, and I center its contents (this is so that I can stretch contents to the edges of the screen).
However, when clicking 'outside' blocks (in order to blur the current selected block), I am basically still clicking on the redactor, which inserts an empty new block at the end.
How can I prevent editor.js from doing this? (without preventing clicks on the redactor - obviously)
@cossssmin can you provide screenshots or video describing your case?
Yes, here you go.
As you can see, depending on where I click outside (top half or bottom half of a block), it adds a new block at the top or bottom. This happens with any block, be it default or custom.
Sorry, I still can not clearly understand the problem. Maybe you can provide steps to reproduce it using the example/example.html file so we can repeat it?
Been a while, but I need to get back to this, so... 😊
Here's a more visual representation:

I've highlighted the ce-block element with a dark gray (centered), and the editor with a lighter gray (added lighter gray to codex-editor__redactor). The editor (lighter gray) goes from edge to edge in the browser (I have it at full width so I can do full width blocks).
If I click the lighter gray area - so, if I click the editor but outside of a block - a new empty (paragraph) block is added:

I wonder, could it be the stub mentioned in this function?
https://github.com/codex-team/editor.js/blob/43032ebaac6a8b9a67c9bf2ada5adc0f8592d546/src/components/modules/renderer.ts#L64
Because I do get this line in the console:
https://github.com/codex-team/editor.js/blob/43032ebaac6a8b9a67c9bf2ada5adc0f8592d546/src/components/modules/renderer.ts#L76

... so my understanding is that it fails to find a block type when I click the editor area, and it falls back to inserting an empty paragraph.
If this is the case, how can I prevent it from adding an empty paragraph like that, without modifying my editor's width?
Hi @cossssmin, have you found a solution? tackling the same specific behavior on my project.
Any solution? I have a similar problem, when some block does not pass the check, the default block is added
Any update?