mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Open mobile map button: fix since position sticky was unreliable on Safari
This commit is contained in:
parent
aaba33e8b3
commit
89b6c2a164
5 changed files with 6 additions and 13 deletions
|
|
@ -6,7 +6,7 @@
|
|||
}
|
||||
|
||||
.listingCards {
|
||||
padding: 0 24px 30px 24px;
|
||||
padding: 0 24px 96px 24px;
|
||||
|
||||
@media (--viewportMedium) {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ const SearchResultsPanel = props => {
|
|||
return (
|
||||
<div className={classes}>
|
||||
<div className={css.listingCards}>
|
||||
{props.children}
|
||||
{listings.map(l => (
|
||||
<ListingCard
|
||||
className={css.listingCard}
|
||||
|
|
@ -29,6 +28,7 @@ const SearchResultsPanel = props => {
|
|||
currencyConfig={currencyConfig}
|
||||
/>
|
||||
))}
|
||||
{props.children}
|
||||
</div>
|
||||
{paginationLinks}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -84,9 +84,10 @@
|
|||
font-weight: var(--fontWeightSemiBold);
|
||||
|
||||
/* Positioning */
|
||||
/* Safari didn't like bottom: 48px; -> hence calc from top */
|
||||
/* Positioning from top to place button just above Safari's bottom toolbar
|
||||
/* 120px = button height + toolbar height (68px) */
|
||||
position: fixed;
|
||||
top: calc(100vh - 100px);
|
||||
top: calc(100vh - 120px);
|
||||
left: 50vw;
|
||||
width: 175px;
|
||||
transform: translateX(-50%);
|
||||
|
|
@ -121,11 +122,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.openMobileMapSticky {
|
||||
position: sticky;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.mapPanel {
|
||||
|
||||
@media (--viewportMedium) {
|
||||
|
|
|
|||
|
|
@ -270,9 +270,7 @@ export class SearchPageComponent extends Component {
|
|||
search={searchParamsForPagination}
|
||||
>
|
||||
<div
|
||||
className={classNames(css.openMobileMap, {
|
||||
[css.openMobileMapSticky]: listings.length > 0,
|
||||
})}
|
||||
className={css.openMobileMap}
|
||||
onClick={() => {
|
||||
this.useLocationSearchBounds = true;
|
||||
this.modalOpenedBoundsChange = true;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ exports[`SearchPageComponent matches snapshot 1`] = `
|
|||
rootClassName={null}
|
||||
search={Object {}}>
|
||||
<div
|
||||
className=""
|
||||
onClick={[Function]}>
|
||||
<MapIcon
|
||||
className={null} />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue