diff --git a/web/dist/main.css b/web/dist/main.css index d076e67..dd49a23 100644 --- a/web/dist/main.css +++ b/web/dist/main.css @@ -571,6 +571,13 @@ html { .ld-header { display: flex; + background: hsla(0,0%,100%,.9); + padding-top: 10px; + padding-bottom: 10px; + position: fixed; + top: 60px; + z-index: 100; + width: 100%; } .ld-header .back-to-results { @@ -605,7 +612,7 @@ html { .ld-details { border: 1px solid #e6e6e6; padding: 0 10px; - margin-top: 15px; + margin-top: 45px; } .image-dots { diff --git a/web/lib/handlers.js b/web/lib/handlers.js index 4c30a83..145c09c 100644 --- a/web/lib/handlers.js +++ b/web/lib/handlers.js @@ -45,6 +45,9 @@ const setMaxSize = ({ type, action }, component) => { }; const viewListingDetails = ({ type, action }, component) => { + const scrollElem = document.querySelector('.right-content'); + component.savedScrollTop = scrollElem.scrollTop; + component.setState({ listingDetails: true, listingId: action.id, @@ -56,6 +59,8 @@ const viewListingDetails = ({ type, action }, component) => { if (m) { m.marker.setIcon(component.selectedMarkerIcon()); } + + scrollElem.scrollTop = 0 }); }; @@ -195,6 +200,9 @@ const backToResults = ({type, action}, component) => { if (prevSelected) { prevSelected.marker.setIcon(component.visitedMarkerIcon()); } + + const scrollElem = document.querySelector('.right-content'); + scrollElem.scrollTop = component.savedScrollTop; }); }