ソースを参照

[text-editor] dont keep refreshing value

version-14
Rushabh Mehta 8年前
コミット
43ccc84584
1個のファイルの変更9行の追加6行の削除
  1. +9
    -6
      frappe/public/js/frappe/form/control.js

+ 9
- 6
frappe/public/js/frappe/form/control.js ファイルの表示

@@ -1887,12 +1887,15 @@ frappe.ui.form.ControlTextEditor = frappe.ui.form.ControlCode.extend({
if(!this._last_change_on || (moment() - moment(this._last_change_on) > 3000)) {
this.editor.summernote('code', value);
} else {
var interval = setInterval(() => {
if(moment() - moment(this._last_change_on) > 3000) {
this.editor.summernote('code', value);
clearInterval(interval);
}
}, 1000);
if(!this._setting_value) {
this._setting_value = setInterval(() => {
if(moment() - moment(this._last_change_on) > 3000) {
this.editor.summernote('code', this.last_value);
clearInterval(this._setting_value);
this._setting_value = null;
}
}, 1000);
}
}
},
set_focus: function() {


読み込み中…
キャンセル
保存