correctHeadlinesOffset: add opera remark

This commit is contained in:
Andrew Dolgov 2007-05-16 05:06:05 +01:00
parent 0d88fd97df
commit a5e46e0f76
1 changed files with 5 additions and 1 deletions

View File

@ -363,10 +363,14 @@ function correctHeadlinesOffset(id) {
debug("Rtop: " + rel_offset_top + " Rbtm: " + rel_offset_bottom);
debug("Vport: " + viewport);
if (rel_offset_top <= 0 || rel_offset_top > viewport) {
container.scrollTop = row.offsetTop;
} else if (rel_offset_bottom > viewport) {
/* doesn't properly work with Opera in some cases because
Opera fucks up element scrolling */
container.scrollTop = row.offsetTop + row.offsetHeight - viewport;
}