diff --git a/lib/client/editor.js b/lib/client/editor.js index e4e9bb8c..a7e2f97b 100644 --- a/lib/client/editor.js +++ b/lib/client/editor.js @@ -135,9 +135,14 @@ CloudCommander.Editor.CodeMirror.show = (function(){ lLoadingImage.className = 'icon loading';/* показываем загрузку*/ lErrorImage.className = 'icon error hidden';/* прячем ошибку */ - /* show loading icon */ - lCurrent.firstChild.nextSibling.appendChild(lLoadingImage); + + /* show loading icon * + * if it not showed */ + var lCurrent = lCurrent.firstChild.nextSibling; + if(lCurrent !== lLoadingImage.parentElement) + appendChild(lLoadingImage); + this.loading = true; var lParent = this; /* reading data from current file */ @@ -200,7 +205,7 @@ CloudCommander.Editor.CodeMirror.hide = (function(pParent) { CloudCommander.Editor.Keys = (function(){ "use strict"; - + /* loading js and css of CodeMirror */ this.CodeMirror.show(this.CodeMirror);