[text-editor] dont keep refreshing value

This commit is contained in:
Rushabh Mehta 2017-07-05 13:11:45 +05:30
parent da683b6f28
commit f00976eebb

View file

@ -1885,7 +1885,7 @@ frappe.ui.form.ControlTextEditor = frappe.ui.form.ControlCode.extend({
set_in_editor: function(value) {
// set value after user has stopped editing
let interval = setInterval(() => {
if(moment() - moment(this._last_change_on) < 3000) {
if(moment() - moment(this._last_change_on) > 3000) {
this.editor.summernote('code', value);
clearInterval(interval);
}