Windsurf mobile

Fixed Position Elements Broken in iOS Safari on Windsurf App

Fixed-position elements in your Windsurf-generated app — sticky headers, bottom navigation bars, floating action buttons, modals — behave erratically in iOS Safari. They jump when scrolling, disappear behind the keyboard when typing, or drift out of position when the address bar shows or hides.

iOS Safari handles position: fixed differently from desktop browsers and even Android Chrome. The viewport dynamically resizes as the address bar and toolbar show/hide during scrolling, and the virtual keyboard pushes fixed elements around instead of overlaying them. This affects millions of iPhone users.

You might see a bottom navigation bar floating in the middle of the screen, a fixed header that bounces during scroll, a modal that's half-hidden behind the keyboard, or a chat input fixed to the bottom that jumps above the keyboard and back.

Error Messages You Might See

Fixed header jumps on iOS Safari scroll Bottom navigation hidden behind keyboard Modal not visible when keyboard is open Position fixed not working inside transform parent 100vh is taller than visible area on iOS
Fixed header jumps on iOS Safari scrollBottom navigation hidden behind keyboardModal not visible when keyboard is openPosition fixed not working inside transform parent100vh is taller than visible area on iOS

Common Causes

  • Dynamic viewport height changes — iOS Safari's address bar show/hide changes the viewport height, causing fixed elements using vh units to jump
  • Virtual keyboard pushing layout — When the keyboard opens, iOS resizes the visual viewport but doesn't always reposition fixed elements correctly
  • Momentum scrolling conflicts — iOS's elastic bounce scrolling (-webkit-overflow-scrolling: touch) interferes with fixed positioning inside scrollable containers
  • Transform on parent elements — A CSS transform on any ancestor creates a new containing block, making position: fixed behave like position: absolute
  • Safe area not accounted for — Fixed bottom elements are hidden behind the iPhone home indicator bar or notch

How to Fix It

  1. Use dvh instead of vh — Replace 100vh with 100dvh (dynamic viewport height) which accounts for the iOS address bar. Fallback: height: -webkit-fill-available
  2. Handle keyboard with visualViewport API — Listen to window.visualViewport resize events to reposition fixed elements when the keyboard opens
  3. Add safe area insets — Use env(safe-area-inset-bottom) padding on fixed bottom elements to avoid the iPhone home indicator
  4. Avoid transforms on parent elements — If a fixed element's ancestor has transform, will-change, or filter, move the fixed element outside that ancestor in the DOM
  5. Use position: sticky instead — For headers, position: sticky within a scroll container often works more reliably than position: fixed on iOS
  6. Test on a real iPhone — iOS Safari bugs cannot be reproduced in Chrome DevTools mobile simulation. Test on an actual device or BrowserStack

Real developers can help you.

Victor Denisov Victor Denisov Developer Jared Hasson Jared Hasson Full time lead founding dev at a cyber security saas startup, with 10 yoe and a bachelor's in CS. Building & debugging software products is what I've spent my time on for forever Richard McSorley Richard McSorley Full-Stack Software Engineer with 8+ years building high-performance applications for enterprise clients. Shipped production systems at Walmart (4,000+ stores), Cigna (20M+ users), and Arkansas Blue Cross. 5 patents in retail/supply chain tech. Currently focused on AI integrations, automation tools, and TypeScript-first architectures. Alvin Voo Alvin Voo I’ve watched the tech landscape evolve over the last decade—from the structured days of Java Server Pages to the current "wild west" of Agentic-driven development. While AI can "vibe" a frontend into existence, I specialize in the architecture that keeps it from collapsing. My expertise lies in the critical backend infrastructure: the parts that must be fast, secure, and scalable. I thrive on high-pressure environments, such as when I had only three weeks to architect and launch an Ethereum redemption system with minimal prior crypto knowledge, turning it into a major revenue stream. What I bring to your project: Forensic Debugging: I don't just "patch" bugs; I use tools like Datadog and Explain Analyzers to map out bottlenecks and resolve root causes—like significantly reducing memory usage by optimizing complex DB joins. Full-Stack Context: Deep experience in Node.js and React, ensuring backends play perfectly with mobile and web teams. Sanity in the Age of AI: I bridge the gap between "best practices" and modern speed, ensuring your project isn't just built fast, but built to last. Sage Fulcher Sage Fulcher Hey I'm Sage! Im a Boston area software engineer who grew up in South Florida. Ive worked at a ton of cool places like a telehealth kidney care startup that took part in a billion dollar merger (Cricket health/Interwell health), a boutique design agency where I got to work on a ton of exciting startups including a photography education app, a collegiate Esports league and more (Philosophie), a data analytics as a service startup in Cambridge (MA) as well as at Phillips and MIT Lincoln Lab where I designed and developed novel network security visualizations and analytics. I've been writing code and furiously devoted to using computers to make people’s lives easier for about 17 years. My degree is in making computers make pretty lights and sounds. Outside of work I love hip hop, the Celtics, professional wrestling, magic the gathering, photography, drumming, and guitars (both making and playing them) Taufan Taufan I’m a product-focused engineer and tech leader who builds scalable systems and turns ideas into production-ready platforms. Over the past years, I’ve worked across startups and fast-moving teams, leading backend architecture, improving system reliability, and shipping products used by thousands of users. My strength is not just writing code — but connecting product vision, technical execution, and business impact. Daniel Vázquez Daniel Vázquez Software Engineer with over 10 years of experience on Startups, Government, big tech industry & consulting. Tejas Chokhawala Tejas Chokhawala Full-stack engineer with 5 years experience building production web apps using React, Next.js and TypeScript. Focused on performance, clean architecture and shipping fast. Experienced with Supabase/Postgres backends, Stripe billing, and building AI-assisted developer tools. Anthony Akpan Anthony Akpan Developer with 8 years of experience building softwares fro startups Krishna Sai Kuncha Krishna Sai Kuncha Experienced Professional Full stack Developer with 8+ years of experience across react, python, js, ts, golang and react-native. Developed inhouse websearch tooling for AI before websearch was solved : )

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

Why does 100vh not work on iOS Safari?

iOS Safari defines 100vh as the height of the viewport with the address bar hidden (the tallest possible height). When the address bar is visible, the actual visible area is smaller than 100vh, causing overflow. Use 100dvh or -webkit-fill-available instead.

Can I detect when the iOS keyboard is open?

Use the Visual Viewport API: window.visualViewport.height will be smaller than window.innerHeight when the keyboard is open. Listen to the resize event on window.visualViewport to react to keyboard show/hide.

Related Windsurf Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help