always call setMode callback after the event
This commit is contained in:
parent
4d8a31fd54
commit
414667916e
1 changed files with 4 additions and 3 deletions
|
|
@ -886,8 +886,9 @@ var EditSession = function(text, mode) {
|
||||||
this.$modes["ace/mode/text"] = new TextMode();
|
this.$modes["ace/mode/text"] = new TextMode();
|
||||||
|
|
||||||
if (this.$modes[path] && !options) {
|
if (this.$modes[path] && !options) {
|
||||||
cb && cb(this.mode);
|
this.$onChangeMode(this.$modes[path]);
|
||||||
return this.$onChangeMode(this.$modes[path]);
|
cb && cb();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// load on demand
|
// load on demand
|
||||||
this.$modeId = path;
|
this.$modeId = path;
|
||||||
|
|
@ -903,7 +904,7 @@ var EditSession = function(text, mode) {
|
||||||
m.$id = path;
|
m.$id = path;
|
||||||
}
|
}
|
||||||
this.$onChangeMode(m);
|
this.$onChangeMode(m);
|
||||||
cb && cb(this.mode);
|
cb && cb();
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue