-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use window.top.location instead of window.location when embedded in iframe? #3950
Comments
Perhaps id should check if all needed libraries are loaded and abort gracefully with a message in the body. This could contain a link to the osm main page. |
You said
But in a way that is the true location. /edit can give multiple editors depending on the user preference. But still we had the problem with old URLs in the DB right now |
#2449 describes more why we have a In practice, people are not running multiple versions of iD in multiple iframes, and I think for usability purposes it is better to record a URL that people can actually visit. |
For the current stored (many) urls IMHO we should have a solution. So i am not really sure if changing the url in the future is really needed |
Just because there is existing stored changeset tags that point to the invalid url doesn't mean we can't fix the problem. If anybody really cares, somebody could run a SQL update to change all the old values. |
see openstreetmap/openstreetmap-website#1518
The issue here is that on openstreetmap.org, iD is running in an iframe. We detect the host using this line of code.
window.location.origin + window.location.pathname
writes "https://www.openstreetmap.org/id" into the changeset
host
tag.When embedded, we could do:
window.top.location.origin + window.top.location.pathname
to get "http://www.openstreetmap.org/edit" in the changeset
host
tag.The text was updated successfully, but these errors were encountered: