Improve browser compatibility of pat-modal.