diff options
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/views/modules/pedigree-map/chart.phtml | 4 | ||||
| -rw-r--r-- | resources/views/modules/place-hierarchy/map.phtml | 4 | ||||
| -rw-r--r-- | resources/views/modules/places/tab.phtml | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/resources/views/modules/pedigree-map/chart.phtml b/resources/views/modules/pedigree-map/chart.phtml index 7e53408e2e..2c9b65d60e 100644 --- a/resources/views/modules/pedigree-map/chart.phtml +++ b/resources/views/modules/pedigree-map/chart.phtml @@ -26,7 +26,7 @@ use Fisharebest\Webtrees\View; const scrollOptions = { behavior: "smooth", - block: "start", + block: "nearest", inline: "start" }; @@ -46,7 +46,6 @@ use Fisharebest\Webtrees\View; let resetCallback = function (event) { event.preventDefault(); map.flyToBounds(markers.getBounds(), {padding: [50, 30], maxZoom: 15 }); - sidebar.firstElementChild.scrollIntoView(scrollOptions); } /** @@ -89,7 +88,6 @@ use Fisharebest\Webtrees\View; }) .on('popupclose', function () { sidebar.childNodes.forEach(e => e.classList.remove('messagebox')); - sidebar.firstElementChild.scrollIntoView(scrollOptions); }); }, onEachFeature: function (feature, layer) { diff --git a/resources/views/modules/place-hierarchy/map.phtml b/resources/views/modules/place-hierarchy/map.phtml index 4d564463ca..43a5cee4eb 100644 --- a/resources/views/modules/place-hierarchy/map.phtml +++ b/resources/views/modules/place-hierarchy/map.phtml @@ -28,7 +28,7 @@ use Fisharebest\Webtrees\View; const scrollOptions = { behavior: "smooth", - block: "start", + block: "nearest", inline: "start" }; @@ -46,7 +46,6 @@ use Fisharebest\Webtrees\View; let resetCallback = function (event) { event.preventDefault(); map.flyToBounds(markers.getBounds(), { padding: [50, 30], maxZoom: 15 }); - sidebar.firstElementChild.scrollIntoView(scrollOptions); }; /** @@ -82,7 +81,6 @@ use Fisharebest\Webtrees\View; }) .on('popupclose', function () { sidebar.querySelectorAll('.mapped').forEach(e => e.classList.remove('messagebox')); - sidebar.firstElementChild.scrollIntoView(scrollOptions); }); }, onEachFeature: function (feature, layer) { diff --git a/resources/views/modules/places/tab.phtml b/resources/views/modules/places/tab.phtml index 68dd95485d..bf111c1f53 100644 --- a/resources/views/modules/places/tab.phtml +++ b/resources/views/modules/places/tab.phtml @@ -29,7 +29,7 @@ use Fisharebest\Webtrees\I18N; const scrollOptions = { behavior: "smooth", - block: "start", + block: "nearest", inline: "start" }; @@ -47,7 +47,6 @@ use Fisharebest\Webtrees\I18N; let resetCallback = function (event) { event.preventDefault(); map.flyToBounds(markers.getBounds(), {padding: [50, 30], maxZoom: 15 }); - sidebar.firstElementChild.scrollIntoView(scrollOptions); } /** @@ -90,7 +89,6 @@ use Fisharebest\Webtrees\I18N; }) .on("popupclose", function() { sidebar.childNodes.forEach(e => e.classList.remove('messagebox')); - sidebar.firstElementChild.scrollIntoView(scrollOptions); }); }, onEachFeature: function(feature, layer) { |
