From 9f8496d2be5c083c42ccd220e019214ff31c696b Mon Sep 17 00:00:00 2001 From: Ashar Fuadi Date: Wed, 31 Aug 2022 23:30:21 +0700 Subject: [PATCH] Ranking: scroll to the correct position when clicking on a selected contestant --- cmsranking/static/Scoreboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmsranking/static/Scoreboard.js b/cmsranking/static/Scoreboard.js index 8b003af04f..18756e6839 100644 --- a/cmsranking/static/Scoreboard.js +++ b/cmsranking/static/Scoreboard.js @@ -491,7 +491,7 @@ var Scoreboard = new function () { self.scroll_into_view = function (u_id) { var $row = $("tr.user[data-user=" + u_id + "]", self.tbody_el); var $frame = $("#InnerFrame"); - var scroll = $row.position().top + $frame.scrollTop() + $row.height() / 2 - $frame.height() / 2; + var scroll = $row.position().top + $row.height() / 2 - $frame.height() / 2; $frame.scrollTop(scroll); }; };