Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Modal taller than mobile screen: fix unreachable close button

PRF-179High impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

A modal is a box that opens on top of the page: a lead form, an offer, a booking widget or a cookie panel. On a desktop it has plenty of room. On a phone the screen is short, and the browser's address bar and keyboard take more of it.

The problem happens when the modal is taller than the visible screen and the page behind it is locked. The modal cannot scroll, so the bottom part, usually the submit button and sometimes the close (X) button at the top, is cut off and cannot be reached.

Why it costs you leads or sales

A visitor who opens your form but cannot reach the submit button cannot become a lead. A visitor who cannot close a popup cannot see the page under it. Most will leave rather than hunt for a way out.

It is also easy to miss. Your team usually tests on large screens, and the form looks fine there. Nothing errors, no email fails and analytics may still record the modal opening. You only see fewer submissions from phones.

Where the visitor gets stuck
  1. Tap CTAVisitor taps the button that opens the modal
  2. Modal opensForm shows, but it is taller than the screen
  3. Fill fieldsKeyboard opens and hides even more
  4. SubmitButton is off screen and the modal will not scroll
  5. Lead recordedNever happens

The modal opens, but the submit button is below the visible screen and cannot be scrolled to.

Form completion by deviceExample numbers
Form completion by device (example)Desktop: 24 %; Mobile (broken modal): 6 %; Mobile (fixed modal): 20 %091824620DesktopMobile (broken modal)Mobile (fixed modal)%

Example: illustrative numbers showing how a cut-off submit button can pull down mobile completion compared with desktop.

How to check if your site has it

Test your modals on a small screen
  1. List every modal

    Include lead forms, exit-intent popups, booking pop-ups, newsletter boxes, quick-view and cart drawers.

  2. Use browser device mode

    In Chrome, open DevTools (F12), click the device toolbar icon and pick a small phone such as iPhone SE (375x667). Also try 320x568 and landscape.

  3. Open each modal and try to scroll

    Check you can reach the close button and the submit button without zooming. Try scrolling inside the modal and on the page behind it.

  4. Focus a field

    Tap the last field. On a real phone the keyboard covers roughly half the screen. Check the submit button is still reachable by scrolling.

  5. Test on real devices

    Emulators do not reproduce the iOS Safari address bar or keyboard exactly. Check an iPhone and an Android phone if you can.

  6. Add content to stress it

    Trigger error messages, long translations and extra fields. These make the modal taller than it was in your first test.

How to fix it

The principle is the same everywhere: the modal never exceeds the visible screen, the content inside it scrolls, and the close button stays in view. Start with the CSS below, then apply it in your platform.

Scrollable modal that fits any phone screencss
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 100vh;      /* fallback */
  max-height: 100dvh;     /* visible screen on modern phones */
  display: flex;
  flex-direction: column;
  background: #fff;
}

.modal__header {
  flex: 0 0 auto;         /* stays visible with the close button */
}

.modal__body {
  flex: 1 1 auto;
  overflow-y: auto;       /* the form scrolls inside the modal */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal__footer {
  flex: 0 0 auto;         /* submit button always visible */
}
Apply the fix on your platform
  1. Find the popup source

    Identify whether the modal comes from your theme, a popup plugin (such as Elementor Popups or a form plugin) or a page builder.

  2. Use the built-in mobile settings

    In popup builders, open the mobile view and set height to Auto, enable scrolling inside the popup and move the close button inside the box.

  3. Add CSS if needed

    Add the snippet under Appearance > Customize > Additional CSS, using the plugin's real class names found with browser Inspect.

Modal behaviour before and after

Before

  • Fixed height or 100vh
  • No scrolling inside the modal
  • Submit button below the visible screen
  • Close button outside the box

After

  • max-height: 100dvh
  • Body scrolls inside the modal
  • Submit button always visible in the footer
  • Close button inside the header

How to confirm it's fixed

Confirmation checks
  • At 320x568 and 375x667 you can see and tap the close button without scrolling
  • The submit button is reachable with the keyboard open
  • Scrolling inside the modal works and the page behind does not jump
  • Landscape orientation is usable
  • Error messages do not push the submit button out of reach
  • A real iPhone and Android phone both pass
  • A test submission reaches your inbox or CRM

How to prevent it happening again

Habits that keep modals usable
  • Add a small-screen modal test to your release checklist
  • Never set a fixed pixel height on a modal
  • Use dvh with a vh fallback
  • Keep close and submit buttons in non-scrolling header and footer areas
  • Retest after adding fields, translations or new popup apps
  • Review popups after theme or plugin updates

How FunnelGuard handles this

FunnelGuard does not check for this yet. Detecting a modal that is taller than the screen with an unreachable button is a possible future check, not a current feature.

What FunnelGuard does today is run your real customer journeys on a schedule, such as a lead form, and check each step, the tracking hits sent to ad and analytics platforms, and whether test leads reach your inbox and CRM. If a modal problem stops the form from completing in a monitored journey, the journey could fail and you would be alerted that the step broke, but FunnelGuard would not tell you the cause is the modal height.

How the problem usually unfolds
  1. Day 0

    A new popup form is added and checked on a desktop only.

  2. Day 1

    Phone visitors open it and cannot reach the submit button.

  3. Week 2

    Mobile leads look low, but nothing shows an error.

  4. Week 3

    Someone tests on a small phone and spots the cut-off button.

  5. Week 3

    CSS fix goes live and mobile submissions recover.

Questions people ask

Why can't I see the close button on my popup on mobile?

The popup is probably taller than the visible screen, or the close button sits outside the box and is clipped. Cap the modal with max-height: 100dvh, make the content scroll inside it and place the close button inside the header.

Why is my form submit button cut off in a modal on my phone?

The modal has a fixed height or 100vh and cannot scroll, so the bottom of the form falls below the visible area. The on-screen keyboard makes it worse. Let the body of the modal scroll and keep the submit button in a footer that stays visible.

What is the difference between vh and dvh for modals?

vh is based on the largest viewport, often with the browser address bar hidden, so a 100vh box can run past the visible screen. dvh follows the real visible height as the address bar shows or hides. Use dvh with a vh fallback for older browsers.

How do I make a modal scrollable on mobile?

Set max-height to 100dvh on the dialog, use a flex column layout and add overflow-y: auto to the content area. Adding overscroll-behavior: contain stops the page behind from scrolling along with it.

How do I test a modal on a small phone screen?

Open Chrome DevTools, turn on device mode and choose a small phone such as iPhone SE or a 320px width. Open the modal, scroll inside it and focus the last field. Then confirm on a real iPhone and Android phone, because emulators miss some keyboard behaviour.

Does a popup that traps mobile users hurt conversions?

Yes. If visitors cannot submit or dismiss the popup, they cannot become leads and many leave the page. The loss is silent because no error is logged, so compare mobile and desktop completion rates to spot it.

Can FunnelGuard detect a modal that is too tall on mobile?

Not yet. This is a possible future check. FunnelGuard does run your real journeys on a schedule and alerts you if a step fails, but it does not currently identify modal height as the cause.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.