<h2 dir="auto">bug 1</h2>
<p dir="auto">Open the right sidebar, then open a dropdown menu ("more" or user menu):</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/assets/4158490/9607c116-1646-4ffb-afdc-341cac581fc6">image.png (view on web)</a></p>
<p dir="auto">Seems to work fine. Now make the screen smaller. If you get the intermediate width like in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2236331780" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4675" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/4675/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/4675">#4675</a>, the dropdown menu will be covered by the sidebar:</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/assets/4158490/61efe369-b73f-4584-9a0b-fc58d87137ae">image.png (view on web)</a></p>
<p dir="auto">Bootstrap sets z-index to 1000 on dropdowns which should be high enough, but we use even higher z-indexes on map ui elements. We do this to keep them above Leaflet's range of z-indexes. What we could do instead and what this PR does is to isolate Leaflet in its own <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context" rel="nofollow">stacking context</a>. Here I set the entire map at z-0 with a Bootstrap utility class. The right sidebar gets z-2 to stay above the floating left sidebar, which gets z-1.</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/assets/4158490/6820ddc4-88ca-4315-8bc3-1341f9ed85f1">image.png (view on web)</a></p>
<h2 dir="auto">bug 2</h2>
<p dir="auto">Open the right sidebar on a small screen then try to open the menu:</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/assets/4158490/6c84b873-bb44-4a15-876b-4d8091426006">image.png (view on web)</a></p>
<p dir="auto">The menu is a part of the header, with z-index below the right sidebar. In addition to the fixes above I set the header at z-3:</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/assets/4158490/3fd36ba8-72aa-4097-9b28-6e7d4ae72c23">image.png (view on web)</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/4686'>https://github.com/openstreetmap/openstreetmap-website/pull/4686</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4686/commits/c3c4bf59c2f5710b6793b220c5b53a8dd7b33faf" class="commit-link">c3c4bf5</a>  Put map in its own stacking context</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4686/commits/485ac16cfc7e4442cedd945cca33fca54d1f30d2" class="commit-link">485ac16</a>  Use Bootstrap to set z-indexes of map-overlapping ui</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4686/files">3 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4686/files#diff-e86a39e6d0b163f152db8843fc7d647a3f5d648de4a74f1732bef4474b6e5bc8">app/assets/stylesheets/common.scss</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4686/files#diff-6d2ef58207c92d1533287af551a075122ba98240a861819047a2ae77b7674f0b">app/views/layouts/_header.html.erb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4686/files#diff-eaeaf6b733bc454c8c41be224e85cdca90bc6e0e5bc1f02f9f86315cfc6fafab">app/views/layouts/map.html.erb</a>
    (6)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4686.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4686.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4686.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4686.diff</a></li>
</ul>

<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/pull/4686">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLQ5KQMS4SIMNBKW7LY47URTAVCNFSM6AAAAABGEHQ6TCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2DAMRVG42TOMQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLML3OXXEQGJMFXE5LLY47URTA5CNFSM6AAAAABGEHQ6TCWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHILB46EQ.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/pull/4686</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/pull/4686",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4686",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>