mirror of
https://github.com/codex-team/editor.js
synced 2024-05-09 01:46:46 +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 */
|
||||
while (focusedNode.contentEditable != 'true') {
|
||||
while (focusedNode && focusedNode.contentEditable != 'true') {
|
||||
|
||||
focusedNodeHolder = focusedNode.parentNode;
|
||||
focusedNode = focusedNodeHolder;
|
||||
|
@ -302,4 +302,4 @@ module.exports = (function (caret) {
|
|||
|
||||
return caret;
|
||||
|
||||
})({});
|
||||
})({});
|
||||
|
|
|
@ -91,6 +91,12 @@ module.exports = (function (inline) {
|
|||
newCoordinateX,
|
||||
newCoordinateY;
|
||||
|
||||
if (!coords) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (toolbar.offsetHeight === 0) {
|
||||
|
||||
defaultOffset = 40;
|
||||
|
@ -590,4 +596,4 @@ module.exports = (function (inline) {
|
|||
|
||||
return inline;
|
||||
|
||||
})({});
|
||||
})({});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "codex.editor",
|
||||
"version": "1.7.8",
|
||||
"version": "1.7.9",
|
||||
"description": "Codex Editor. Native JS, based on API and Open Source",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in a new issue