From cfa749947d1dc12c79861f2011ffbbcdd2295617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20B=C3=B6hm?= Date: Sat, 7 Nov 2026 06:30:09 +0000 Subject: [PATCH] Keep the bottom bar at the bottom on iOS after typing (26.11.18) iOS left the fixed bottom bar where the keyboard had ended. The bar now hides while an editable field has focus and afterwards pins itself to the visual viewport, nudging iOS to re-measure with a scroll in place. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HUc2nv7rJVU2gp3Bgtha3q --- CLAUDE.md | 8 ++++++ OlaresManifest.yaml | 4 +-- components/app-nav.tsx | 5 ++++ e2e/pwa.spec.ts | 16 +++++++++++ lib/use-keyboard-nav.ts | 59 ++++++++++++++++++++++++++++++++++++++ olares/Chart.yaml | 4 +-- olares/OlaresManifest.yaml | 4 +-- olares/markt/26.11.18.md | 5 ++++ 8 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 lib/use-keyboard-nav.ts create mode 100644 olares/markt/26.11.18.md diff --git a/CLAUDE.md b/CLAUDE.md index ca0f3d9..5962667 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -323,6 +323,14 @@ Vorlagen ersetzt. `tests/seed.test.ts` prüft die Dateien. Ein Haushalt `gerichte`, `mehr`, `runde`. Schreibende Routen lassen Kinder nur beim Wünschen zu (`WISHERS`), ein Veto nie. +## Untere Leiste am iPhone + +- iOS lässt eine feste Leiste nach dem Schließen der Tastatur oft dort stehen, wo die + Tastatur endete (Kai, 7.11.2026). `components/app-nav.tsx` nutzt deshalb + `useKeyboardSafeNav` (`lib/use-keyboard-nav.ts`): beim Tippen `hidden`, danach am + `visualViewport` ausgerichtet (`translateY` um die Lücke) und ein Scroll auf der + Stelle. Eine neue feste Leiste unten nutzt denselben Haken. `e2e/pwa.spec.ts` wacht. + ## AI - **Standard ist der Olares Router** (seit 26.11.17, Kai 7.11.2026, wie Relay): diff --git a/OlaresManifest.yaml b/OlaresManifest.yaml index 6c3e857..00f6c82 100644 --- a/OlaresManifest.yaml +++ b/OlaresManifest.yaml @@ -21,7 +21,7 @@ metadata: title: What's cooking? description: The family decides together what's for dinner — and the shopping list writes itself. Runs entirely on your own box. icon: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png - version: 26.11.17 + version: 26.11.18 categories: - Applications @@ -61,7 +61,7 @@ permission: appData: true spec: - versionName: '26.11.17' + versionName: '26.11.18' featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png promoteImage: diff --git a/components/app-nav.tsx b/components/app-nav.tsx index 43ce8a4..b4d8e57 100644 --- a/components/app-nav.tsx +++ b/components/app-nav.tsx @@ -6,6 +6,7 @@ import { usePathname, useRouter } from "next/navigation"; import { useTranslations } from "next-intl"; import { cn } from "@/lib/utils"; import { clearCaches } from "@/lib/clear-caches"; +import { useKeyboardSafeNav } from "@/lib/use-keyboard-nav"; // Untere Leiste unter dem Daumen (Leitprinzip 8). Plan und Einkauf kommen // mit ihren Arbeitspaketen dazu. @@ -28,9 +29,13 @@ export function AppNav({ child = false }: { child?: boolean }) { const path = usePathname(); const router = useRouter(); const items = child ? CHILD_ITEMS : ITEMS; + // Beim Tippen weg, danach unten am sichtbaren Bereich (iOS, lib/use-keyboard-nav.ts). + const { ref, typing } = useKeyboardSafeNav(); return (