]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/edit/id.js.erb
Add reload on iframe redirect
[rails.git] / app / assets / javascripts / edit / id.js.erb
index 7f111b41ec4bfcad8bf24a3385874b3b265fac16..b32f6cb011819c7ced3c5bc70d8f7921dd7f5de3 100644 (file)
@@ -36,4 +36,10 @@ $(function () {
   if (idData.gpx) params.set("gpx", idData.gpx);
 
   id.attr("src", idData.url + "#" + params);
+
+  id.ready(function () {
+    if (!this.contentWindow.location.href.startsWith(idData.url)) {
+      location.reload();
+    }
+  });
 });