mirror of
https://github.com/codex-team/editor.js
synced 2024-05-24 17:42:22 +02:00
Merge 94a3b7449b
into bd1de56ef3
This commit is contained in:
commit
a002c32d08
|
@ -29,7 +29,8 @@
|
|||
"tools:update": "yarn _tools:checkout && yarn _tools:pull && yarn _tools:make",
|
||||
"test:e2e": "yarn build:test && cypress run",
|
||||
"test:e2e:open": "yarn build:test && cypress open",
|
||||
"devserver:start": "yarn build && node ./devserver.js"
|
||||
"devserver:start": "yarn build && node ./devserver.js",
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"author": "CodeX",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -75,5 +76,8 @@
|
|||
"collective": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/editorjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"yarn": "^1.22.21"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -841,9 +841,13 @@ export default class UI extends Module<UINodes> {
|
|||
|
||||
/**
|
||||
* Event can be fired on clicks at non-block-content elements,
|
||||
* for example, at the Inline Toolbar or some Block Tune element
|
||||
* for example, at the Inline Toolbar or some Block Tune element.
|
||||
* We also make sure that the closest block belongs to the current editor and not a parent
|
||||
*/
|
||||
const clickedOutsideBlockContent = focusedElement.closest(`.${Block.CSS.content}`) === null;
|
||||
const closestBlock = focusedElement.closest(`.${Block.CSS.content}`);
|
||||
const clickedOutsideBlockContent =
|
||||
closestBlock === null
|
||||
|| (closestBlock.closest(`.${Selection.CSS.editorWrapper}`) !== this.nodes.wrapper);
|
||||
|
||||
if (clickedOutsideBlockContent) {
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue