return false;
},
focusNext: function() {
+ if (!this.duringEditing()) return true;
var nextNode = this.model.nextNode({ childrenAllowed: true });
- if (!nextNode) return false;
+ if (!nextNode) { // If it's the last node, move the cursor to the end of the node by allowing the default action.
+ return true;
+ }
+
this.stopEditingText();
nextNode.getView().startEditingText();
return false;
},
moveDown: function() {
this._maintainingFocus(_.bind(function() {
- this.model.moveDown();
+ return this.model.moveDown();
}, this));
+
return false;
},
moveUp: function() {
return false;
},
focusNext: function() {
+ if (!this.duringEditing()) return true;
var nextNode = this.model.nextNode({ childrenAllowed: true });
- if (!nextNode) return false;
+ if (!nextNode) { // If it's the last node, move the cursor to the end of the node by allowing the default action.
+ return true;
+ }
+
this.stopEditingText();
nextNode.getView().startEditingText();
return false;
},
moveDown: function() {
this._maintainingFocus(_.bind(function() {
- this.model.moveDown();
+ return this.model.moveDown();
}, this));
+
return false;
},
moveUp: function() {
return false;
},
focusNext: function() {
+ if (!this.duringEditing()) return true;
var nextNode = this.model.nextNode({ childrenAllowed: true });
- if (!nextNode) return false;
+ if (!nextNode) { // If it's the last node, move the cursor to the end of the node by allowing the default action.
+ return true;
+ }
+
this.stopEditingText();
nextNode.getView().startEditingText();
return false;
},
moveDown: function() {
this._maintainingFocus(_.bind(function() {
- this.model.moveDown();
+ return this.model.moveDown();
}, this));
+
return false;
},
moveUp: function() {