Fixed document panel when opening sharing link

This commit is contained in:
benweet 2013-10-20 14:55:01 +01:00
parent cdb42d807a
commit 0ef074c1a1

View File

@ -177,7 +177,8 @@ define([
filterFiles('');
// Scroll to the active file
panelContentElt.scrollTop += documentListElt.querySelector('.file.active').getBoundingClientRect().top - 120;
var activeElt = documentListElt.querySelector('.file.active');
activeElt && (panelContentElt.scrollTop += activeElt.getBoundingClientRect().top - 120);
}
});