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(); } }