[openstreetmap/openstreetmap-website] Move History and Export buttons to secondary nav (PR #5151)

Anton Khorev notifications at github.com
Fri Sep 13 11:37:50 UTC 2024


@AntonKhorev commented on this pull request.



> @@ -412,6 +412,9 @@ $(document).ready(function () {
 
     if (OSM.router.route(this.pathname + this.search + this.hash)) {
       e.preventDefault();
+      if (this.pathname !== "/directions") {

The code here closes the menu after clicking on any menu item except *directions*. By *menu* I mean everything that shows up when the burger button is clicked. The directions form is inside this menu, therefore an exception is made for it, the menu should stay open to keep the form visible.

app\assets\javascripts\index\directions.js:123:5 happens after the route endpoints are received, then you can hide the form and the rest of the menu.

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

Message ID: <openstreetmap/openstreetmap-website/pull/5151/review/2302886217 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240913/5b8230f1/attachment.htm>


More information about the rails-dev mailing list