<p>Steps to reproduce:</p>
<ol>
<li>Open link <a href="https://www.openstreetmap.org/way/140950703">https://www.openstreetmap.org/way/140950703</a>
</li>
<li>Drag the map (this is important!)</li>
<li>Close left sidebar</li>
<li>Drag the map:</li>
</ol>
<p><strong>Actual result:</strong> map jumps to the left when you start dragging;<br>
<strong>Expected result:</strong> map is dragged normally.</p>
<p><a href="https://cloud.githubusercontent.com/assets/720808/16985493/77f3f2aa-4e89-11e6-991f-8351b9442726.gif" target="_blank"><img src="https://cloud.githubusercontent.com/assets/720808/16985493/77f3f2aa-4e89-11e6-991f-8351b9442726.gif" alt="osm_sidebar_bug" style="max-width:100%;"></a></p>
<p>I found two workarounds:</p>
<h3>Workaround 1:</h3>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/blob/master/app/assets/javascripts/leaflet.map.js#L263">leaflet.map.js line #263</a> put <code>animate:true</code>. I don't know why, but it helps.</p>
<h3>Workaround 2:</h3>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/blob/master/vendor/assets/leaflet/leaflet.js#L8664">leaflet.js line #8664</a><br>
remove assignment <code>this._el._leaflet_pos = this._newPos</code>. For some reason, this could help.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/1255">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLdgVyoyfmMTTpMUQFMq7IG1p9fpnks5qXg1WgaJpZM4JQs6A">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLQrBZje42a72kI0k4SGIktsVxybjks5qXg1WgaJpZM4JQs6A.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/issues/1255"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>