From aeea31bd8bfebe3bb14b66dc16d5c7d1393c0bb2 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Fri, 25 Nov 2022 14:54:48 +0000 Subject: Merge: #4316 - remove unnecessary scrolling from map sidebars --- resources/views/modules/pedigree-map/chart.phtml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'resources/views/modules/pedigree-map/chart.phtml') 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) { -- cgit v1.3