modal.preventScroll Boolean (default: false)

Specifies whether the document will stop scrolling when a modal dialog is opened. Closing the modal dialog has to restore the initial document overflow. The modal.preventScroll setting will modify the overflow rule of the document and, therefore, cannot be used together with the containment option.

Multiple windows with different preventScroll settings are not supported.


<div id="dialog"></div>
  modal: {
      preventScroll: true
In this article