diff --git a/client/src/styles.css b/client/src/styles.css index 6048e93..0e26255 100644 --- a/client/src/styles.css +++ b/client/src/styles.css @@ -213,11 +213,25 @@ button.danger { background: #5a2a2a; border-color: #7a3a3a; color: #fff; } flex-direction: column; min-height: 0; } +/* #39 follow-up: overflow-y: auto directly on a flex column that also has + justify-content: flex-end doesn't reliably scroll in WebKit/Safari (the + iOS 12+ targets this app builds for) — the flex-end-justified overflow + gets clipped instead of becoming a scrollable region, so from the user's + side it looked identical to the original overflow: hidden bug. Standard + workaround: the overflow/scroll and the flex-end alignment can't live on + the same element — .cart-items is now a plain scroll container (no + justify-content), and .cart-items-inner is the flex column that actually + bottom-anchors short lists via min-height: 100% (a floor, not a fixed + height, so it still grows past 100% and scrolls normally once content + overflows it). */ .cart-items { flex: 1 1 0; min-height: 0; overflow-y: auto; margin-bottom: 6px; +} +.cart-items-inner { + min-height: 100%; display: flex; flex-direction: column; justify-content: flex-end; diff --git a/client/src/tablet/Sale.tsx b/client/src/tablet/Sale.tsx index d7ec122..bcda05f 100644 --- a/client/src/tablet/Sale.tsx +++ b/client/src/tablet/Sale.tsx @@ -198,45 +198,47 @@ export function Sale({ config, onChangeBar }: Props) {
- {isEmpty &&
Keine Einträge
} - {lines.map((l, i) => { - const d = drinkById.get(l.drink_id); - if (!d) return null; - return ( -
+
+ {isEmpty &&
Keine Einträge
} + {lines.map((l, i) => { + const d = drinkById.get(l.drink_id); + if (!d) return null; + return ( +
+
+ + {l.qty}× {d.name} + +
+ {formatCents(d.price_cents * l.qty)} +
+ ); + })} + {bar.pfand_cents > 0 && pfandCount > 0 && ( +
+ {pfandCount}× Pfand + {formatCents(bar.pfand_cents * pfandCount)} +
+ )} + {pfandReturns > 0 && ( +
- - {l.qty}× {d.name} -
- {formatCents(d.price_cents * l.qty)} + {formatCents(-bar.pfand_cents * pfandReturns)}
- ); - })} - {bar.pfand_cents > 0 && pfandCount > 0 && ( -
- {pfandCount}× Pfand - {formatCents(bar.pfand_cents * pfandCount)} -
- )} - {pfandReturns > 0 && ( -
-
- - {pfandReturns}× Pfand zurück - -
- {formatCents(-bar.pfand_cents * pfandReturns)} -
- )} + )} +
{formatCents(total)}