X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/51d2a846ece990db7c4109ecf923ad9201c6f8e6..21a08ca546377ca2edd074abc8120c19685091b7:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 5c7b2d26e..820c268b6 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -396,7 +396,7 @@ $(document).ready(function () { OSM.router.load(); $(document).on("click", "a", function (e) { - if (e.isDefaultPrevented() || e.isPropagationStopped()) { + if (e.isDefaultPrevented() || e.isPropagationStopped() || $(e.target).data("turbo")) { return; } @@ -412,6 +412,9 @@ $(document).ready(function () { if (OSM.router.route(this.pathname + this.search + this.hash)) { e.preventDefault(); + if (this.pathname !== "/directions") { + $("header").addClass("closed"); + } } });