From 2fc0c1dcf37bf118c51e8bfc2c42390e8c2e4c3c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 30 Jul 2012 13:53:00 +0300 Subject: [PATCH] Update lib/client/editor.js --- lib/client/editor.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/client/editor.js b/lib/client/editor.js index 95d042ab..4313abc1 100644 --- a/lib/client/editor.js +++ b/lib/client/editor.js @@ -86,9 +86,15 @@ CloudCommander.Editor.CodeMirror = { /* fixing after first showinng CodeMirror bug */ var lCodeMirror = this.getByClass('CodeMirror'); if(lCodeMirror.length) { + var lDiv = lCodeMirror[0].getElementsByTagName('div'); - if(lDiv.length) - lDiv[0].style.cssText += lDiv.style.cssText + ';top:26px;left:57px'; + if(lDiv.length){ + lDiv = lDiv[0]; + + lDiv.style.cssText += + lDiv.style.cssText + + ';top:26px;left:57px'; + } } lCloudEditor && (lCloudEditor.className = '');