mirror of
https://github.com/codex-team/editor.js
synced 2024-06-01 05:22:35 +02:00
parent
9190824b1d
commit
d2d18f8061
|
@ -7,6 +7,7 @@
|
||||||
- `Fix` *Tunes API* - Tune config now passed to constructor under `config` property
|
- `Fix` *Tunes API* - Tune config now passed to constructor under `config` property
|
||||||
- `Fix` *Types* - Add common type for internal and external Tools configuration
|
- `Fix` *Types* - Add common type for internal and external Tools configuration
|
||||||
- `Fix` — Block's destroy method is called on block deletion
|
- `Fix` — Block's destroy method is called on block deletion
|
||||||
|
- `Fix` - Fix jump to the button of editor zone on CBS
|
||||||
|
|
||||||
### 2.22.1
|
### 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
|
* - otherwise, add a new empty Block and set a Caret to that
|
||||||
*/
|
*/
|
||||||
private redactorClicked(event: MouseEvent): void {
|
private redactorClicked(event: MouseEvent): void {
|
||||||
|
const { BlockSelection } = this.Editor;
|
||||||
|
|
||||||
if (!Selection.isCollapsed) {
|
if (!Selection.isCollapsed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -689,7 +691,12 @@ export default class UI extends Module<UINodes> {
|
||||||
return;
|
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) {
|
if (isClickedBottom) {
|
||||||
stopPropagation();
|
stopPropagation();
|
||||||
|
|
Loading…
Reference in a new issue