Skip to content

Commit

Permalink
Ranking: scroll to the correct position when clicking on a selected c…
Browse files Browse the repository at this point in the history
…ontestant
  • Loading branch information
fushar committed Aug 31, 2022
1 parent e494acd commit 9f8496d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmsranking/static/Scoreboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
};

0 comments on commit 9f8496d

Please sign in to comment.