Fix scrolling map filters panel on mobile

This commit is contained in:
Ian Renton
2025-11-01 17:05:47 +00:00
parent 0570b39e09
commit 30fc333c8b
3 changed files with 14 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
% rebase('webpage_base.tpl') % rebase('webpage_base.tpl')
<div id="map"> <div id="map">
<div class="mt-3 px-3" style="z-index: 1002; position: relative;"> <div id="maptools" class="mt-3 px-3" style="z-index: 1002; position: relative;">
<div class="row"> <div class="row">
<div class="col-auto me-auto pt-3"></div> <div class="col-auto me-auto pt-3"></div>
<div class="col-auto"> <div class="col-auto">

View File

@@ -246,13 +246,24 @@ div.band-spot:hover span.band-spot-info {
/* GENERAL MOBILE SUPPORT */ /* GENERAL MOBILE SUPPORT */
@media (max-width: 991.99px) { @media (max-width: 991.99px) {
/* General "hide this on mobile" class */
.hideonmobile { .hideonmobile {
display: none !important; display: none !important;
} }
/* Make map stretch to horizontal screen edges */
div#map, div#table-container, div#bands-container { div#map, div#table-container, div#bands-container {
margin-left: -1em; margin-left: -1em;
margin-right: -1em; margin-right: -1em;
} }
/* Avoid map page filters panel being larger than the map itself */
#maptools .appearing-panel {
max-height: 30em;
}
#maptools .appearing-panel .card-body {
max-height: 26em;
overflow: scroll;
}
/* Filter/search DX Call field should be smaller on mobile */
input#filter-dx-call { input#filter-dx-call {
max-width: 6em; max-width: 6em;
margin-right: 0; margin-right: 0;

View File

@@ -249,4 +249,6 @@ $(document).ready(function() {
setUpMap(); setUpMap();
// Call loadOptions(), this will then trigger loading spots and setting up timers. // Call loadOptions(), this will then trigger loading spots and setting up timers.
loadOptions(); loadOptions();
// Prevent scrolling actions in the popup menus being passed through to the map
L.DomEvent.disableScrollPropagation(document.getElementById('maptools'));
}); });