X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8530e3eedb2918c4602295fef8dd34028c8077b8..1cded7d151f6af733c3760815a00b0a259d9ba17:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index ef23e340d..e9e95abfe 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -292,8 +292,8 @@ $(document).ready(function () { }); $(document).on("click", "a", function(e) { - if (e.isPropagationStopped()) return; - if (OSM.route(this.pathname + this.search + this.hash)) e.preventDefault(); + if (e.isDefaultPrevented() || e.isPropagationStopped()) return; + if (this.host === window.location.host && OSM.route(this.pathname + this.search + this.hash)) e.preventDefault(); }); $("#search_form").on("submit", function(e) {