New thread list logic (step 2)

This commit is contained in:
RainLoop Team 2015-04-21 02:39:14 +04:00
parent b656b6365b
commit 03d26bc4c6
18 changed files with 139 additions and 517 deletions

View file

@ -633,13 +633,20 @@
var
iOffset = 20,
aList = this.list(),
oFocused = $(this.sItemFocusedSelector, this.oContentScrollable),
oPos = oFocused.position(),
iVisibleHeight = this.oContentVisible.height(),
iFocusedHeight = oFocused.outerHeight()
;
if (oPos && (oPos.top < 0 || oPos.top + iFocusedHeight > iVisibleHeight))
if (aList && aList[0] && aList[0].focused())
{
this.oContentScrollable.scrollTop(0);
return true;
}
else if (oPos && (oPos.top < 0 || oPos.top + iFocusedHeight > iVisibleHeight))
{
if (oPos.top < 0)
{