fix issue with filemanager modal and scroll

This commit is contained in:
Simon Vieille 2021-08-20 11:34:26 +02:00
parent 0693559449
commit 5e21a23cb1
1 changed files with 8 additions and 1 deletions

View File

@ -25,8 +25,15 @@ const openModal = function (url) {
module.exports = function () {
let click = 0
const body = $('body')
$('body').on('click', '*[data-modal]', (e) => {
body.on('hidden.bs.modal', '.modal', (e) => {
if ($('.modal.show').length) {
$('body').addClass('modal-open')
}
})
body.on('click', '*[data-modal]', (e) => {
e.preventDefault()
e.stopPropagation()