aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/static/scripts.js
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/static/scripts.js')
-rw-r--r--juick-www/src/main/static/scripts.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index a12ec709..c6a960f0 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -524,7 +524,9 @@ function openDialog(html) {
${html}
</div>
</div>`;
- document.querySelector('body').insertAdjacentHTML('afterbegin', dialogHtml);
+ let body = document.querySelector('body');
+ body.classList.add('dialog-opened');
+ body.insertAdjacentHTML('afterbegin', dialogHtml);
document.addEventListener('keydown', closeDialogListener);
document.querySelector('#dialogb').addEventListener('click', closeDialog);
document.querySelector('#dialogc').addEventListener('click', closeDialog);
@@ -535,6 +537,7 @@ function closeDialog() {
if (draft) {
window.draft = draft.value;
}
+ document.querySelector('body').classList.remove('dialog-opened');
document.querySelector('#dialogb').remove();
document.querySelector('#dialogt').remove();
}