Author: Takuya Aramaki (takaram) Committer: GitHub (web-flow) Pusher: saundefined Date: 2024-11-29T13:28:14+03:00
Commit: https://github.com/php/web-php/commit/98641f0bb9117c4c89fe5d214b6c8ddba5f37c9e Raw diff: https://github.com/php/web-php/commit/98641f0bb9117c4c89fe5d214b6c8ddba5f37c9e.diff Fix parameter link scrolling to the correct position (#1171) Changed paths: M js/common.js Diff: diff --git a/js/common.js b/js/common.js index cea565982e..a81da820bb 100644 --- a/js/common.js +++ b/js/common.js @@ -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); }