1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Fix parameter link scrolling to the correct position (#1171)

This commit is contained in:
Takuya Aramaki
2024-11-29 19:28:14 +09:00
committed by GitHub
parent b7b728e1c1
commit 98641f0bb9

View File

@@ -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();
}
@@ -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);
}