mirror of
https://github.com/codex-team/editor.js
synced 2024-05-16 21:36:48 +02:00
parent
9190824b1d
commit
d2d18f8061
|
@ -7,6 +7,7 @@
|
|||
- `Fix` *Tunes API* - Tune config now passed to constructor under `config` property
|
||||
- `Fix` *Types* - Add common type for internal and external Tools configuration
|
||||
- `Fix` — Block's destroy method is called on block deletion
|
||||
- `Fix` - Fix jump to the button of editor zone on CBS
|
||||
|
||||
### 2.22.1
|
||||
|
||||
|
|
|
@ -662,6 +662,8 @@ export default class UI extends Module<UINodes> {
|
|||
* - otherwise, add a new empty Block and set a Caret to that
|
||||
*/
|
||||
private redactorClicked(event: MouseEvent): void {
|
||||
const { BlockSelection } = this.Editor;
|
||||
|
||||
if (!Selection.isCollapsed) {
|
||||
return;
|
||||
}
|
||||
|
@ -689,7 +691,12 @@ export default class UI extends Module<UINodes> {
|
|||
return;
|
||||
}
|
||||
|
||||
const isClickedBottom = event.target instanceof Element && event.target.isEqualNode(this.nodes.redactor);
|
||||
const isClickedBottom = event.target instanceof Element &&
|
||||
event.target.isEqualNode(this.nodes.redactor) &&
|
||||
/**
|
||||
* If there is cross block selection started, target will be equal to redactor so we need additional check
|
||||
*/
|
||||
!BlockSelection.anyBlockSelected;
|
||||
|
||||
if (isClickedBottom) {
|
||||
stopPropagation();
|
||||
|
|
Loading…
Reference in a new issue