From 70002f4efb101c14abe1d0725c6d5ca528fa9340 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Sat, 18 Nov 2023 15:02:26 +0300 Subject: [PATCH] 0.0.229 scroll to element after edit --- static/js/user_profile.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 35eb886..9050a61 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -509,6 +509,16 @@ function sendRoute(el, routeID = null){ // location.href = '/profile' document.querySelector(".info_profile").innerHTML = data.html + // let dataset = document.querySelector(`[data-number-of-route=${routeID}]`) + + let el_route = document.querySelector(".carrier-card") + let el_route_id = el_route.dataset.numberOfRoute; + if(el_route_id){ + el_route.scrollIntoView(true); + } + + + // document.querySelector(".tab_user_messanger.select").scrollIntoView({behavior: "smooth",block:'nearest',inline:'nearest'});