Change detection of the edit request to use the URL as the class
will not be set on the body now, and force the router to think we
actually loaded the normal view.
e.preventDefault();
});
- if (OSM.preferred_editor == "remote" && $('body').hasClass("site-edit")) {
- remoteEditHandler(map.getBounds());
- }
-
if (OSM.params().edit_help) {
$('#editanchor')
.removeAttr('title')
"/changeset/:id": OSM.Browse(map, 'changeset')
});
+ if (OSM.preferred_editor == "remote" && document.location.pathname == "/edit") {
+ remoteEditHandler(map.getBounds());
+ OSM.router.setCurrentPath("/");
+ }
+
OSM.router.load();
$(document).on("click", "a", function(e) {
router.stateChange(loadState || {});
};
+ router.setCurrentPath = function (path) {
+ currentPath = path;
+ currentRoute = routes.recognize(currentPath);
+ };
+
map.on('moveend baselayerchange overlaylayerchange', router.updateHash);
$(window).on('hashchange', router.hashUpdated);