<p></p>
<p dir="auto">For both zooming in / zooming out issue;<br>
Related code for (clicking on) notes is located at <a href="https://github.com/openstreetmap/openstreetmap-website/blob/a796c41881c26e6da8828a71dbfb533613e5a83f/app/assets/javascripts/index/note.js.erb#L103C75-L103C75">this line</a> if you want to skip looking through the commits.</p>
<p dir="auto">The only expected behaviour with this code</p>
<ul dir="auto">
<li>When entering the website with a -note etc.- URL without location parameters, go to the default zoom.</li>
</ul>
<p dir="auto">The observed behaviour:</p>
<ul dir="auto">
<li>On selecting the first note, you will retain the location parameters. On the second you will not. When closing or commenting, the check 'is it a url with location parameters?' no longer checks out, sending you to the default zoom as before. See the recording for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1905399828" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4256" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/4256/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/4256">#4256</a> and look at how the URL bar changes on each action, for example.</li>
<li>They will also be lost when the first note is selected, the page is reloaded (note stays 'selected') and the note is re-selected<br>
(re-selecting the first note this way is not possible without reloading the page.)</li>
<li>They will furthermore not show up when first choosing the "Add a note" tool, then selecting a second note.</li>
</ul>
<p dir="auto">Doing something else as mentioned <a href="https://github.com/openstreetmap/openstreetmap-website/issues/648#issuecomment-30221163" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/648/hovercard">above</a> will add back location parameters and escape this issue, though there may be other ways to tinker with the URL.</p>
<p dir="auto">I suppose the site initially adds the <code class="notranslate">note/id</code> in front of the location parameters. And, in above cases, it replaces this part or just the id and throws away the rest. In the last case, there is nothing to throw away behind <code class="notranslate">note/new</code>, so it stays as-is.<br>
This could also happen when there's a javascript error and you get a full page reload instead of a partial reload, according to Anton. However, I think <a href="https://github.com/openstreetmap/openstreetmap-website/issues/3730#issuecomment-1288852590" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/3730/hovercard">this</a> is/was a different issue. Anyhow, I personally do not get any (javascript) errors.</p>
<p dir="auto">This could be (partially) fixed by checking if a note is selected, or alternatively always re-adding parameters after loading.<br>
(maybe neither is practical though, there might be an easier fix.)</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/648#issuecomment-1732102275">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNUPV7CAINLZQJFGF3X3YIBDANCNFSM4AKMB45Q">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJPRVK23HUOWBZEO3DX3YIBDA5CNFSM4AKMB452YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOM464RAY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/648/1732102275</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/648#issuecomment-1732102275",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/648#issuecomment-1732102275",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>