correctHeadlinesOffset: check for elements to work on

This commit is contained in:
Andrew Dolgov 2012-09-04 12:10:42 +04:00
parent b8cdc39433
commit e4f48f8621
1 changed files with 2 additions and 0 deletions

View File

@ -1793,6 +1793,8 @@ function correctHeadlinesOffset(id) {
var container = $("headlines-frame");
var row = $("RROW-" + id);
if (!container || !row) return;
var viewport = container.offsetHeight;
var rel_offset_top = row.offsetTop - container.scrollTop;