check for a coords or focusedNode is null (#255)

* check for a coords or focusedNode is null

* bump version
This commit is contained in:
Taly 2018-05-25 17:49:46 +03:00 committed by Peter Savchenko
parent 05d657cdc6
commit b9b07135f7
5 changed files with 13 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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;
})({}); })({});

View file

@ -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;
})({}); })({});

View file

@ -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": {