fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing element highlighting synchronization issue
[fnpeditor.git]
/
modules
/
documentCanvas
/
canvas
/
canvas.js
diff --git
a/modules/documentCanvas/canvas/canvas.js
b/modules/documentCanvas/canvas/canvas.js
index
9b57d93
..
318a22f
100644
(file)
--- a/
modules/documentCanvas/canvas/canvas.js
+++ b/
modules/documentCanvas/canvas/canvas.js
@@
-146,7
+146,13
@@
$.extend(Canvas.prototype, {
var cursor = canvas.getCursor();
if(!cursor.isSelecting()) {
var position = cursor.getPosition(),
var cursor = canvas.getCursor();
if(!cursor.isSelecting()) {
var position = cursor.getPosition(),
- elements = position.element.split({offset: position.offset}),
+ element = position.element;
+
+ if(!(element.parent().parent())) {
+ return false; // top level element is unsplittable
+ }
+
+ var elements = position.element.split({offset: position.offset}),
newEmpty,
goto;
newEmpty,
goto;