y-dynamic modals + hide overflow on modal

toast
Kit Kasune 3 years ago
parent 203c057afc
commit 3b81cc7929
  1. 1
      scripts/contextmenu/newfolder.js
  2. 1
      scripts/modal/post.js
  3. 2
      scripts/modal/pre.js
  4. 2
      styles/modal.css

@ -8,7 +8,6 @@ const showError = require('../modal/common/error');
const clearModals = require('../modal/clearmodals');
module.exports = () => {
console.log('e');
if (window.kade.modal) {console.log('hboonk'); return;}
preModal('new-folder-modal-container');
let modal = document.createElement('div');

@ -3,5 +3,6 @@ const transit = require("./transit");
module.exports = (id) => {
document.getElementById('modal-block').remove();
window.kade.modal = false;
document.body.style.overflow = 'auto';
transit(id, false);
};

@ -5,5 +5,7 @@ module.exports = (id) => {
bl.id = 'modal-block';
document.body.appendChild(bl);
window.kade.modal = true;
document.getElementById('modal-block').style.top = `${window.scrollY}px`;
document.body.style.overflow = 'hidden';
transit(id, true);
};

@ -1,5 +1,5 @@
.modal {
position: absolute;
position: fixed;
width: max-content;
height: max-content;
left: 50%;

Loading…
Cancel
Save