summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
63ee9d9)
(cherry picked from commit
a3899fd)
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(),