Skip to content

Commit

Permalink
Fix parameter link scrolling to the correct position (php#1171)
Browse files Browse the repository at this point in the history
  • Loading branch information
takaram authored Nov 29, 2024
1 parent b7b728e commit 98641f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ $(document).ready(function () {
function findParameter(elt) {
var id = $(elt).text().replace(/^&?(\.\.\.)?\$?/g, '');
return $('.parameters, .options').find('.parameter').filter(function () {
return $(elt).text().trim() === id; // https://bugs.php.net/bug.php?id=74493
return $(this).text().trim() === id; // https://bugs.php.net/bug.php?id=74493
}).first();
}

Expand All @@ -383,7 +383,7 @@ $(document).ready(function () {
var param = findParameter(this);
if (param.length) {
$.scrollTo({
top: param.offset().top - 52,
top: param.offset().top,
left: 0
}, 400);
}
Expand Down

0 comments on commit 98641f0

Please sign in to comment.