[openstreetmap/openstreetmap-website] Rewrite history page url when scrolling (PR #5826)
Tom Hughes
notifications at github.com
Sun Mar 23 15:06:16 UTC 2025
@tomhughes requested changes on this pull request.
Looks good to me - just one small cosmetic comment.
> @@ -97,11 +158,22 @@ OSM.History = function (map) {
.then(response => response.text())
.then(function (html) {
displayFirstChangesets(html);
+ enableChangesetIntersectionObserver();
+
+ if (params.has("before")) {
+ const firstItem = $("#sidebar_content .changesets ol").children().first()[0];
+ firstItem?.scrollIntoView();
+ }
+ if (params.has("after")) {
+ const firstItem = $("#sidebar_content .changesets ol").children().last()[0];
Shouldn't this be `lastItem`?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5826#pullrequestreview-2708609941
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5826/review/2708609941 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250323/6f6ee8d2/attachment.htm>
More information about the rails-dev
mailing list