From 53e357d451fc56eb7a5548f2413a0f575bdbbcf8 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 24 Jul 2012 10:49:16 -0400 Subject: [PATCH] minor changes --- lib/client/keyBinding.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index 32603285..0a9a29b8 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -37,7 +37,15 @@ CloudCommander.keyBinding=(function(){ lCurrentFile.className=''; /* и выделяем предыдущую строку*/ lCurrentFile.previousSibling.className = CloudCommander.CURRENT_FILE; - console.log(lCurrentFile.previousSibling.offsetTop); + + /* if we on the bootom of + * the screan then + * moving down the scroolbar + */ + var lTop = lCurrentFile.previousSibling.offsetTop; + lTop%CloudCommander.HEIGHT < 10 && + lCurrentFile.parentElement.scrollBy(2); + event.preventDefault(); } }