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.
- Tap CTAVisitor taps the button that opens the modal
- Modal opensForm shows, but it is taller than the screen
- Fill fieldsKeyboard opens and hides even more
- SubmitButton is off screen and the modal will not scroll
- Lead recordedNever happens
The modal opens, but the submit button is below the visible screen and cannot be scrolled to.
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
List every modal
Include lead forms, exit-intent popups, booking pop-ups, newsletter boxes, quick-view and cart drawers.
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.
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.
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.
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.
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.
.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 */
}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.
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.
Add CSS if needed
Add the snippet under Appearance > Customize > Additional CSS, using the plugin's real class names found with browser Inspect.
Find where the modal lives
It may be in your theme (quick view, cart drawer, newsletter popup) or an installed app. Check Online Store > Themes > Edit code.
Edit the theme CSS
Add the max-height and overflow rules to the modal class in your theme's CSS file, such as assets/base.css.
Check app popups separately
For app popups, use the app's mobile design settings or contact its support. Do not edit app code you cannot maintain.
Check if a tag injects the popup
Look for Custom HTML tags that load popups or surveys.
Add a CSS override
In that Custom HTML tag, add a style element with the modal rules, using the popup's real selectors.
Preview and publish
Use Preview mode, test on a phone-size screen, then publish.
Select the modal wrapper
In the Designer, switch to Mobile portrait and select the modal box.
Set max height and overflow
In the Style panel, set Max H to 100 dvh (or 100 vh if dvh is not listed) and Overflow to Auto on the inner content.
Keep the close button inside
Position the close button inside the box and publish.
Open the popup in the builder
Edit the funnel or website popup and switch to the mobile view.
Shorten the form
Reduce padding, remove optional fields and shrink images so the popup fits.
Add custom CSS
If it still overflows, add the CSS in the page's custom CSS section, using the real popup class found with Inspect.
Open the lightbox
In the editor, open the lightbox and switch to Mobile view.
Resize and reduce
Cut the content so it fits one phone screen, or use a stacked layout with fewer elements. Check the close button is visible.
Check the popup settings
In the Pop-Up editor, review mobile preview and shrink text, images and spacing.
Add custom CSS
Under Website > Custom CSS, add the max-height and overflow rules to the popup's selector.
Use the CSS pattern
Apply the flex layout with a scrolling body and fixed header and footer.
Lock the page, not the modal
If you set
overflow: hiddenon body while the modal is open, make sure the modal itself can scroll.Use the native dialog where possible
The HTML
dialogelement withshowModal()handles focus and the Escape key, and you can style it with the same max-height rules.
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
- 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
- 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.
Day 0
A new popup form is added and checked on a desktop only.
Day 1
Phone visitors open it and cannot reach the submit button.
Week 2
Mobile leads look low, but nothing shows an error.
Week 3
Someone tests on a small phone and spots the cut-off button.
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.
Related issues
- PRF-158Fixed bottom bar covers form submit buttonFix guide
- PRF-156CTA covered by cookie banner or popupFix guide
- PRF-159Chat bubble covers the submit or checkout buttonFix guide
- PRF-155Main CTA below the fold on mobileFix guide
- PRF-177Layout broken on small phones (320-360 px)Fix guide
- PRF-169Mobile menu cannot be closed or scrolls page behindFix guide