Skip to content

Commit

Permalink
fixing build
Browse files Browse the repository at this point in the history
  • Loading branch information
sokomari committed Oct 18, 2024
1 parent 649f83c commit f23f456
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/edit_session.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class EditSession {
this.$operationResetTimer.schedule();
this.curOp = {
command: commandEvent.command || {},
args: commandEvent.args,
args: commandEvent.args
};
this.curOp.selectionBefore = this.selection.toJSON();
this._signal("startOperation", commandEvent);
Expand Down
11 changes: 5 additions & 6 deletions src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,9 @@ class Editor {
}

onStartOperation(commandEvent) {
this.curOp = this.session.curOp = {
...this.session.curOp,
// scrollTop is kept inside of EditSession only for backwards compatibility reasons
scrollTop: this.renderer.scrollTop
}
// scrollTop is kept inside of session.curOp only for backwards compatibility reasons
this.session.curOp.scrollTop = this.renderer.scrollTop;
this.curOp = this.session.curOp;
this.prevOp = this.session.prevOp;

if (!commandEvent) {
Expand All @@ -128,7 +126,7 @@ class Editor {
* @arg e
*/
onEndOperation(e) {
if (this.curOp) {
if (this.curOp && this.session) {
if (e && e.returnValue === false) {
this.curOp = null;
return;
Expand Down Expand Up @@ -2665,6 +2663,7 @@ class Editor {
if (this._$emitInputEvent)
this._$emitInputEvent.cancel();
this.removeAllListeners();

}

/**
Expand Down

0 comments on commit f23f456

Please sign in to comment.