diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index edfd0e7d..871b93d7 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -39,15 +39,15 @@ CloudCommander.keyBinding=(function(){ lTabPanel[lId] = lCurrentFile; - lId === 'right' && - (lId = 'left') || - (lId = 'right'); + lId = (lId === 'right')? + 'left':'right'; + if(lTabPanel[lId]) + lTabPanel[lId].className = lCurrentFile; - lTabPanel[lId] && - (lTabPanel[lId].className = lCurrentFile) || - (getById(lId).getElementsByTagName('li')[2] - .className = lCURRENT_FILE); + else + getById(lId).getElementsByTagName('li')[2] + .className = lCURRENT_FILE; lCurrentFile.className = '';