Skip to content

Commit 98641f0

Browse files
authored
Fix parameter link scrolling to the correct position (#1171)
1 parent b7b728e commit 98641f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ $(document).ready(function () {
368368
function findParameter(elt) {
369369
var id = $(elt).text().replace(/^&?(\.\.\.)?\$?/g, '');
370370
return $('.parameters, .options').find('.parameter').filter(function () {
371-
return $(elt).text().trim() === id; // https://bugs.php.net/bug.php?id=74493
371+
return $(this).text().trim() === id; // https://bugs.php.net/bug.php?id=74493
372372
}).first();
373373
}
374374

@@ -383,7 +383,7 @@ $(document).ready(function () {
383383
var param = findParameter(this);
384384
if (param.length) {
385385
$.scrollTo({
386-
top: param.offset().top - 52,
386+
top: param.offset().top,
387387
left: 0
388388
}, 400);
389389
}

0 commit comments

Comments
 (0)