[openstreetmap/openstreetmap-website] Preserve hash for map element navigation (PR #7220)

Holger Jeromin notifications at github.com
Sat Jul 11 10:47:46 UTC 2026


@HolgerJeromin commented on this pull request.



> @@ -204,6 +204,7 @@ OSM.Router = function (map, rts) {
     const clickEvent = new (event.constructor)("click", eventOptions);
     const link = document.createElement("a");
     link.href = href;
+    link.hash = location.hash;

> URL fragments to control the UI

You are thinking as: url fragment.
But the point of my comment is, that this has two parts: `hash` and `search`.
Since a few years the website uses `hash` for nearly all "controlling the UI".
So my comment was more about some strange legacy link (which proabably can not survive to this code?) or future changes.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7220#discussion_r3563986817
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7220/review/4677554518 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260711/3e6ad3b8/attachment.htm>


More information about the rails-dev mailing list