tweaks for the new release

This commit is contained in:
nightwing 2015-04-03 13:23:52 +04:00
commit 6fad60f546
3 changed files with 10 additions and 4 deletions

View file

@ -150,9 +150,8 @@ var Editor = function(renderer, session) {
args: commadEvent.args,
scrollTop: this.renderer.scrollTop
};
if (this.curOp.command.name)
if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined)
this.$blockScrolling++;
// this.selections.push(this.selection.toJSON());
};
this.endOperation = function(e) {
@ -161,7 +160,7 @@ var Editor = function(renderer, session) {
return this.curOp = null;
this._signal("beforeEndOperation");
var command = this.curOp.command;
if (command.name && this.$blockScrolling)
if (command.name && this.$blockScrolling > 0)
this.$blockScrolling--;
if (command && command.scrollIntoView) {
switch (command.scrollIntoView) {