From 7fd7924924e6f0c8e325c693a8c2636f96b1f505 Mon Sep 17 00:00:00 2001 From: KaiSD Date: Tue, 3 Sep 2019 19:05:52 +0200 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'ace/index.html'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ace/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ace/index.html b/ace/index.html index 13690eb..2ca470a 100644 --- a/ace/index.html +++ b/ace/index.html @@ -40,8 +40,10 @@ autoScrollEditorIntoView: true }) - editor.setValue(localStorage.getItem("acetest")); - editor.clearSelection(); + if (localStorage.getItem("acetest") === null) { + editor.setValue(localStorage.getItem("acetest")); + editor.clearSelection(); + } editor.getSession().on('change', function () { localStorage.setItem("acetest", editor.getSession().getValue());