fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: adding/clearing node widgets corrupted widgets on all children nodes
[fnpeditor.git]
/
modules
/
documentCanvas
/
canvas
/
keyboard.js
diff --git
a/modules/documentCanvas/canvas/keyboard.js
b/modules/documentCanvas/canvas/keyboard.js
index
d851e3e
..
1830017
100644
(file)
--- a/
modules/documentCanvas/canvas/keyboard.js
+++ b/
modules/documentCanvas/canvas/keyboard.js
@@
-173,11
+173,11
@@
handlers.push({keys: [KEYS.BACKSPACE, KEYS.DELETE],
if(grandParent && grandParent.children().length === 1) {
goto = grandParent.append({text: ''});
} else {
if(grandParent && grandParent.children().length === 1) {
goto = grandParent.append({text: ''});
} else {
- goto =
canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]', direction, element.dom()[0])
);
+ goto =
element.getNearestTextElement(direction
);
}
parent.detach();
} else {
}
parent.detach();
} else {
- goto =
canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]', direction, element.dom()[0])
);
+ goto =
element.getNearestTextElement(direction
);
element.detach();
}
canvas.setCurrentElement(goto, {caretTo: caretTo});
element.detach();
}
canvas.setCurrentElement(goto, {caretTo: caretTo});