From 17be91f6402135df2eaf0235220ecedcaa7ee979 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 11 Mar 2020 16:42:05 +0100 Subject: [PATCH] Fix flash of previous content in kanban codemirror --- www/kanban/inner.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/www/kanban/inner.js b/www/kanban/inner.js index 1efcec034..4d59571d7 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -234,14 +234,14 @@ define([ setValue: function (val, preserveCursor) { if (isBoard) { return; } if (!preserveCursor) { - setTimeout(function () { - editor.setValue(val || ' '); - editor.setValue(val || ''); - editor.save(); - }); + editor.setValue(val || ''); + editor.save(); } else { SFCodeMirror.setValueAndCursor(editor, editor.getValue(), val || ''); } + }, + refresh: function () { + editor.refresh(); } }; editor.on('change', function () { @@ -421,6 +421,7 @@ define([ editModal[type].setValue(item[type]); }); UI.openCustomModal(editModal.modal); + editModal.body.refresh(); }; var getBoardEditModal = function (framework, kanban, id) { // Create modal if needed