diff --git a/main/attendance/attendance_sheet.php b/main/attendance/attendance_sheet.php index 975633f70b..b7cc5ca18d 100644 --- a/main/attendance/attendance_sheet.php +++ b/main/attendance/attendance_sheet.php @@ -85,10 +85,10 @@ if (api_is_allowed_to_edit(null, true)) { var topbar = 0; if ($("#topbar").length != 0) { topbar = $("#topbar").height(); - } - - if ($(".subnav").length != 0) { - topbar = topbar + $(".subnav").height(); + } else { + if ($(".subnav").length != 0) { + topbar = $(".subnav").height(); + } } var top_value = Math.min(scrollTop - offset.top, $(this).height() - floatingHeaderRow.height()) + topbar;