Adds disable functionality for the modal overlay.