fnp
/
fnpeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0bbec0d
)
small fix for lists
author
Jan Szejko
<janek37@gmail.com>
Thu, 23 Feb 2017 17:02:58 +0000
(18:02 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Thu, 23 Feb 2017 17:02:58 +0000
(18:02 +0100)
src/editor/modules/documentCanvas/canvas/keyboard.js
patch
|
blob
|
history
diff --git
a/src/editor/modules/documentCanvas/canvas/keyboard.js
b/src/editor/modules/documentCanvas/canvas/keyboard.js
index
577c2fe
..
0871199
100644
(file)
--- a/
src/editor/modules/documentCanvas/canvas/keyboard.js
+++ b/
src/editor/modules/documentCanvas/canvas/keyboard.js
@@
-360,8
+360,10
@@
var keyEventHandlers = [
applies: function(e, s) {
var parent = s.element && s.element.wlxmlNode.parent(),
parentIsItem = parent && parent.is('item'),
applies: function(e, s) {
var parent = s.element && s.element.wlxmlNode.parent(),
parentIsItem = parent && parent.is('item'),
- itemIsOnList = parent && parent.parent() && parent.parent().is('list');
- return s.type === 'caret' && e.key === KEYS.ENTER && s.element.isEmpty() && parentIsItem && itemIsOnList;
+ itemIsOnList = parent && parent.parent() && parent.parent().is('list'),
+ onlyChild = parent.contents().length === 1;
+ return s.type === 'caret' && e.key === KEYS.ENTER && s.element.isEmpty() && onlyChild &&
+ parentIsItem && itemIsOnList;
},
run: function(e, s) {
var item = s.element.wlxmlNode.parent(),
},
run: function(e, s) {
var item = s.element.wlxmlNode.parent(),