Skip to content

Commit bcb51f2

Browse files
committed
fix: Move session.onChange and placeholder.onChange handlers to be first in the change event handler queue
1 parent 59af84f commit bcb51f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/ace/edit_session.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ EditSession.$uid = 0;
197197
this.doc.off("change", this.$onChange);
198198

199199
this.doc = doc;
200-
doc.on("change", this.$onChange);
200+
doc.on("change", this.$onChange, true);
201201

202202
this.bgTokenizer.setDocument(this.getDocument());
203203

lib/ace/placeholder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass)
5858
this.mainClass = mainClass;
5959
this.othersClass = othersClass;
6060
this.$onUpdate = this.onUpdate.bind(this);
61-
this.doc.on("change", this.$onUpdate);
61+
this.doc.on("change", this.$onUpdate, true);
6262
this.$others = others;
6363

6464
this.$onCursorChange = function() {

0 commit comments

Comments
 (0)