On this page
What this issue is
A popup (also called a modal or overlay) is a box that appears on top of your page. It becomes a problem when the visitor has no way to dismiss it. Common versions: the close button is missing, too small, off-screen on mobile, hidden behind another element, or present but does nothing because a script failed.
Usually the popup also sits on a dark layer (the overlay) that blocks every click on the page underneath. So the visitor is stuck until they leave or reload.
Why it costs you leads or sales
Everything behind the popup is unreachable: the lead form, the add-to-cart button, the chat button, the phone link. A visitor who wants to buy but cannot dismiss the box has no choice but to leave. Ad spend that brought them there is wasted.
It often goes unnoticed because the popup may only break on certain phones, screen sizes, languages or after a theme or plugin update. You test on your laptop and it looks fine.
- Ad clickVisitor lands on the page
- Popup opensOverlay covers the page
- Close attemptButton missing, tiny or dead
- Form or checkoutCannot be reached
- Lead or saleNever happens
The popup opens, the close control fails, and every later step is lost.
Example: illustrative numbers for 100 visitors who see the popup, not measured data.
How to check if your site has it
Test the popup the way a visitor meets it, on more than one device.
- Open the page in a private window so the popup shows again.
- Look for a close button (X) that is visible without scrolling inside the popup.
- Click the X, click outside the popup, and press Esc. At least the X must work.
- Repeat on a real phone, in portrait and landscape.
- Try a small screen (about 360 px wide) using your browser's device mode.
- Zoom the browser to 200% and check the X is still reachable.
- Tab through the popup with the keyboard and confirm focus reaches the close button.
- Check the browser console for red JavaScript errors when the popup opens.
How to fix it
Add a clear close button
Use a visible X in the top corner, at least 44 by 44 px as a tap area, with good contrast against the popup background. Add an accessible label such as aria-label="Close".
Let the overlay and Esc close it
Clicking the dark area outside the popup and pressing Esc should both dismiss it, unless it is a legal notice that needs a choice.
Keep the popup inside the screen
Set a maximum height (for example 90vh) and let the content scroll inside, so the close button never ends up below the visible area on small phones.
Check stacking order
If another element (a sticky header, chat widget or second popup) sits on top of the X, lower its z-index or raise the popup's.
Remove conflicting scripts
If the console shows errors when the popup opens, disable recently added plugins or scripts one at a time until the close button works again.
Test on real devices
Confirm the fix on a phone and a desktop before publishing.
Open your popup plugin
In the plugin's popup editor (Elementor Popups, Popup Maker and similar), find the Close Button or Close settings and turn the button on.
Enable overlay and Esc closing
Look for options such as Click Overlay to Close and Press ESC to Close and switch them on.
Rule out conflicts
Deactivate other plugins one by one and recheck. Also test with a default theme if the X still fails.
Open the popup app's settings
Most popups come from an app. Open it from Apps and edit the popup design to show a close button and allow closing on overlay click.
Check the theme
In Online Store > Themes > Customize, check theme newsletter or announcement popups for a close option.
Disable the app to test
If the problem remains, switch the app's embed off in Customize > App embeds and recheck.
Find the popup tag
If the popup is injected by a Custom HTML tag, open it in Tags and look for markup without a close element.
Add the close control
Add a close button and a click handler (see the code example), then use Preview mode to test before publishing.
Open the popup's Interactions
Select the close button in the Designer and check an interaction exists that hides the popup wrapper on click.
Check size and position
Use the tablet and mobile breakpoints to confirm the button is visible and not pushed outside the popup.
Edit the popup in the builder
Open the popup settings in the funnel or website builder and turn on the close icon.
Check mobile view
Switch to the mobile preview and confirm the icon is visible and tappable.
Open the lightbox
In the Wix editor, select the lightbox popup and open its settings.
Enable closing options
Keep the close (X) button visible and turn on closing when the visitor clicks outside the lightbox. Check the mobile editor view too.
Open the pop-up settings
Edit the page, open the Pop-Up settings and turn on the close button and background click closing.
Check mobile
Preview on mobile and confirm the X is reachable.
Add the close button and handlers
Use the example code to add an X, an overlay click and Esc handler.
Constrain the height
Add max-height and overflow rules so the X never leaves the screen.
<div id="popup" class="overlay" role="dialog" aria-modal="true" aria-label="Offer">
<div class="popup-box">
<button type="button" class="popup-close" aria-label="Close">×</button>
<p>Popup content</p>
</div>
</div>
<style>
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.popup-box { position: relative; background: #fff; max-height: 90vh; overflow: auto; padding: 24px; max-width: 90vw; }
.popup-close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; font-size: 28px; background: none; border: 0; cursor: pointer; }
</style>
<script>
var popup = document.getElementById('popup');
function closePopup() { popup.style.display = 'none'; }
popup.querySelector('.popup-close').addEventListener('click', closePopup);
popup.addEventListener('click', function (e) { if (e.target === popup) closePopup(); });
document.addEventListener('keydown', function (e) { if (e.key === 'Escape') closePopup(); });
</script>The overlay sits on top of the page and the visitor cannot reach the button underneath.
How to confirm it's fixed
- The X is visible and works on desktop and on a real phone.
- Clicking outside the popup and pressing Esc also close it.
- After closing, the page underneath scrolls and the main button can be clicked.
- The popup stays closed when the visitor moves to another page, if your tool is set to do so.
- No red errors appear in the browser console when the popup opens or closes.
How to prevent it happening again
Before
- Popup tested only on a laptop
- No close button on small screens
- Plugin and theme updates not rechecked
After
- Popup tested on phone and desktop
- Close button, overlay click and Esc all work
- Popups rechecked after every update and design change
Add popup checks to your release routine: after any theme, plugin or popup tool update, open the key landing pages in a private window on a phone and close the popup. Keep only one popup active per page, so two overlays cannot trap each other.
How FunnelGuard handles this
FunnelGuard detects this issue only partly. Its robot visitor runs your real journeys on a schedule and runs a check called cta_not_covered. That check fails when something, such as a popup or overlay, sits on top of the button the journey needs to click. So if a stuck popup blocks your form button, add-to-cart or booking button, FunnelGuard flags it, re-checks from a second region, and sends one alert with a screenshot and a likely cause.
What it does not check: whether every popup on every page has a close button, how popups look on each phone model, popups on pages outside your set-up journeys, or popups that only appear for certain triggers such as exit intent. A popup that covers nothing the journey clicks will not fail the check.
Questions people ask
Why can't I close the popup on my website?
The usual causes are a missing or tiny close button, a button pushed off-screen on mobile, another element sitting on top of it, or a JavaScript error that stops the close action. Open the browser console to look for errors, then test with plugins disabled to find the conflict.
How do I add a close button to a popup?
Turn on the close button in your popup tool's settings, or add a button with a click handler that hides the popup. Make the tap area at least 44 by 44 px and give it aria-label="Close" so screen readers announce it.
Why does my popup close button work on desktop but not on mobile?
On small screens the popup is often taller than the viewport, which pushes the X out of sight, or a sticky bar covers it. Set a max-height such as 90vh with scrolling inside the popup, and test on a real phone.
Should clicking outside a popup close it?
Yes, for most marketing popups. Closing on overlay click and on the Esc key gives visitors several ways out. Keep it required only for legal choices, and even then give clear options.
Can a popup that won't close hurt my conversions?
Yes. It covers your form, cart or call button, so visitors cannot act and usually leave. It can also frustrate paid traffic, which wastes ad spend.
Can FunnelGuard detect a popup that cannot be closed?
Partly. Its cta_not_covered check fails when something covers the button a journey needs to click, so a popup blocking your form or checkout button is flagged. It does not audit every popup or close button on your site, so test those by hand.
How do I test a popup that only shows once?
Use a private window or clear the site's cookies and local storage, because many tools remember that a visitor has seen the popup. Then trigger it again by waiting, scrolling or moving to leave the page.
Related issues
- PRF-224Intrusive popup on entry before contentFix guide
- PRF-225Exit-intent popup fires on mobile scrollFix guide
- PRF-226Newsletter popup reappears on every pageFix guide
- PRF-228Cookie banner has no reject option / dark patternFix guide
- PRF-231Rage-click areas (elements that look clickable but aren't)Fix guide
- PRF-208Main CTA not visible without scrollingFix guide