Webflow sync, pageviews & more.
NEW

Why won't my Webflow contact modal close when someone clicks outside the pop-up?

TL;DR
  • Ensure the modal overlay covers the screen, sits beneath the modal, and is not blocked by other elements.
  • Add a mouse click interaction to the overlay that hides both the modal and itself, and confirm no conflicting interactions interfere.

Your Webflow contact modal may not close when clicking outside because the necessary interaction settings are missing or misconfigured.

1. Check the Modal Structure

  • Make sure the modal background (overlay) element covers the entire screen and sits behind the modal content.
  • The overlay should be a semi-transparent div with a higher z-index than other content, but lower than the modal box.

2. Set Interactions on the Overlay

  • Select the overlay element (the dimmed background outside the modal).
  • Go to Interactions > Element Trigger > Mouse Click (Tap).
  • Choose "On 1st Click", then create a new timed animation.
  • In the animation settings:
  • Set it to affect your modal container.
  • Animate the modal to hide (e.g., opacity 0, display: none).
  • Optionally, animate the overlay itself to hide as well.

3. Ensure Modal Is Set to Reappear on Trigger

  • Verify that you’ve created a separate "Show Modal" interaction tied to a button or link that:
  • Displays the modal (e.g., opacity 100%, display: flex or block).
  • Optional: fades in both the overlay and modal content.

4. Check for Conflicting Interactions

  • Make sure no other interactions (such as page-level click handlers) are preventing your overlay click from firing.
  • Test by removing other interactions temporarily to isolate the issue.

5. Use Proper Layering

  • Ensure the overlay is not blocked by other UI elements. It must be above the main page content, but behind the popup/modal.
  • The z-index of the overlay should be lower than the modal window, but higher than the rest of the page.

Summary

The modal likely fails to close because the overlay element does not have a click interaction configured to hide the modal. Assign a mouse click interaction to the overlay that hides the modal and itself when clicked, and verify the elements are layered and displayed correctly.

Rate this answer

Other Webflow Questions