Fix scrolling when touching map on status page (#1777)

This commit is contained in:
Tim Wilkinson 2024-12-23 00:04:11 -08:00 committed by GitHub
parent 69b9bf8e09
commit 8f292117aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 2 deletions

View File

@ -42,7 +42,7 @@
%}
<div class="ctrl" hx-get="status/e/location" hx-target="#ctrl-modal">
{% if (mapurl) { %}
<div class="location-image"><iframe loading="lazy" src="{{mapurl}}"></iframe></div>
<div class="location-image"><iframe loading="lazy" src="{{mapurl}}"></iframe><div class="overlay"></div></div>
<script>
(function(){
fetch("{{mapurl}}").catch(_ => document.querySelector(".location-image").style.display = "none");

View File

@ -45,6 +45,7 @@
overflow-x: hidden;
overflow-y: scroll;
overscroll-behavior: contain;
scrollbar-width: thin;
padding: 0 10px;
}
#ctrl-modal .dialog > div:last-child

View File

@ -382,16 +382,25 @@ body.authenticated .ctrl:hover
}
#location .location-image
{
pointer-events: none;
position: relative;
width: 300px;
height: 150px;
margin: 0 0 15px 10px;
}
#location .location-image iframe
{
position: absolute;
border: 1px solid var(--hr-color);
filter: var(--map-filter);
}
#location .location-image .overlay
{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
/* -- end location layout -- */