mirror of
https://github.com/codex-team/editor.js
synced 2024-05-20 07:16:48 +02:00
check for a coords or focusedNode is null (#255)
* check for a coords or focusedNode is null * bump version
This commit is contained in:
parent
05d657cdc6
commit
b9b07135f7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -98,7 +98,7 @@ module.exports = (function (caret) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Looking for parent contentEditable block */
|
/** Looking for parent contentEditable block */
|
||||||
while (focusedNode.contentEditable != 'true') {
|
while (focusedNode && focusedNode.contentEditable != 'true') {
|
||||||
|
|
||||||
focusedNodeHolder = focusedNode.parentNode;
|
focusedNodeHolder = focusedNode.parentNode;
|
||||||
focusedNode = focusedNodeHolder;
|
focusedNode = focusedNodeHolder;
|
||||||
|
@ -302,4 +302,4 @@ module.exports = (function (caret) {
|
||||||
|
|
||||||
return caret;
|
return caret;
|
||||||
|
|
||||||
})({});
|
})({});
|
||||||
|
|
|
@ -91,6 +91,12 @@ module.exports = (function (inline) {
|
||||||
newCoordinateX,
|
newCoordinateX,
|
||||||
newCoordinateY;
|
newCoordinateY;
|
||||||
|
|
||||||
|
if (!coords) {
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (toolbar.offsetHeight === 0) {
|
if (toolbar.offsetHeight === 0) {
|
||||||
|
|
||||||
defaultOffset = 40;
|
defaultOffset = 40;
|
||||||
|
@ -590,4 +596,4 @@ module.exports = (function (inline) {
|
||||||
|
|
||||||
return inline;
|
return inline;
|
||||||
|
|
||||||
})({});
|
})({});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "codex.editor",
|
"name": "codex.editor",
|
||||||
"version": "1.7.8",
|
"version": "1.7.9",
|
||||||
"description": "Codex Editor. Native JS, based on API and Open Source",
|
"description": "Codex Editor. Native JS, based on API and Open Source",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in a new issue