fix bug: edit & click

修复了编辑时切换到同类对象会使得保存到错误的目标的bug
This commit is contained in:
YouWei Zhao 2020-05-09 22:30:53 +08:00
parent 44f71591b0
commit c4802bcac7

View File

@ -97,12 +97,14 @@ editor_mode = function (editor) {
}
editor_mode.prototype.onmode = function (mode, callback) {
if (editor_mode.mode != mode) {
if (mode === 'save') editor_mode.doActionList(editor_mode.mode, editor_mode.actionList, callback);
if (editor_mode.mode === 'nextChange' && mode) editor_mode.showMode(mode);
if (mode !== 'save') editor_mode.mode = mode;
editor_mode.actionList = [];
}
setTimeout(function(){
if (editor_mode.mode != mode) {
if (mode === 'save') editor_mode.doActionList(editor_mode.mode, editor_mode.actionList, callback);
if (editor_mode.mode === 'nextChange' && mode) editor_mode.showMode(mode);
if (mode !== 'save') editor_mode.mode = mode;
editor_mode.actionList = [];
}
})
}
editor_mode.prototype.showMode = function (mode) {