2

In some situations a lot of sites create modal popups, and I remove these popups by deleting <div> tags with my browser's inspector (Chrome Inspector).

In a subset of these situations, the site has also removed the scrolling feature of the page, so although I restore normal browsing function by removing the modal popup, I can't scroll the page.

How would I typically restore it

Lets use www.exitintent.io as an example after you trigger the exit intent (by moving your mouse outside of the browser)

CQM
  • 42,592
  • 75
  • 224
  • 366

2 Answers2

4

From the inspector remove the modal-open class on the body element or just set overflow: scroll. Then either delete or set display:none on the modal elements

This one:

<div class="modal fade in" id="exitIntentModal" tabindex="-1" role="dialog" aria-labelledby="exitIntentModalLabel" aria-hidden="false" style="display: block;">

This one as well:

<div class="modal-backdrop fade in"></div>
James Freund
  • 473
  • 4
  • 13
  • I tried adding in a html div `style="overflow:scroll"`, it showed scroll bars after that but they would not scroll, firefox here. – VeganEye Nov 07 '20 at 22:39
1

In general, and specifically for the www.exitintent.io site that you linked, the way to "disable" scroll is to add overflow: hidden to the body and html elements of the page.

So on that site you linked, I was able to remove overflow in the inspector on both those elements (the body element has several declarations that need to be removed) and get the page scrolling again.

ghost_dad
  • 1,308
  • 2
  • 12
  • 21