Skip to content

Commit f3b34e7

Browse files
committed
Fix console log scroll pinning
There appears to be no id="header" element in these pages. In old JQuery this returned null, and was treated as 0, however it returns undefined in modern JQuery which makes the calculation evaluation to NaN, breaking the functionality.
1 parent 4608031 commit f3b34e7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

server/src/main/webapp/WEB-INF/rails/app/assets/javascripts/build_detail_page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
$(".content_wrapper_outer").toggleClass("full-screen");
151151
$(window).trigger($.Event("resetPinOnScroll"), [{
152152
calcRequiredScroll: function () {
153-
return $(".console-area").offset().top - $("#header").outerHeight(true) - $(".page_header").outerHeight(true);
153+
return $(".console-area").offset().top - $(".page_header").outerHeight(true);
154154
}
155155
}]);
156156
});

server/src/main/webapp/WEB-INF/rails/app/assets/javascripts/console_log_tailing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
$(".console-area").on('consoleCompleted consoleUpdated consoleInteraction', function () {
8282
$(window).trigger($.Event("resetPinOnScroll"), [{
8383
calcRequiredScroll: function () {
84-
return $(".console-area").offset().top - $("#header").outerHeight(true) - $(".page_header").outerHeight(true);
84+
return $(".console-area").offset().top - $(".page_header").outerHeight(true);
8585
}
8686
}]);
8787
});

0 commit comments

Comments
 (0)