mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed issue that the document could not be scrolled anymore, when redirected from a modal
This fixes issue #696
This commit is contained in:
parent
4a6ec2581d
commit
76e945bbbd
1 changed files with 13 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
import {Dropdown} from "bootstrap";
|
import {Dropdown} from "bootstrap";
|
||||||
import ClipboardJS from "clipboard";
|
import ClipboardJS from "clipboard";
|
||||||
|
import {Modal} from "bootstrap";
|
||||||
|
|
||||||
class RegisterEventHelper {
|
class RegisterEventHelper {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -31,9 +32,11 @@ class RegisterEventHelper {
|
||||||
//Initialize ClipboardJS
|
//Initialize ClipboardJS
|
||||||
this.registerLoadHandler(() => {
|
this.registerLoadHandler(() => {
|
||||||
new ClipboardJS('.btn');
|
new ClipboardJS('.btn');
|
||||||
})
|
});
|
||||||
|
|
||||||
this.registerModalDropRemovalOnFormSubmit();
|
this.registerModalDropRemovalOnFormSubmit();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
registerModalDropRemovalOnFormSubmit() {
|
registerModalDropRemovalOnFormSubmit() {
|
||||||
|
@ -43,6 +46,15 @@ class RegisterEventHelper {
|
||||||
if (back_drop) {
|
if (back_drop) {
|
||||||
back_drop.remove();
|
back_drop.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Remove scroll-lock if it is still active
|
||||||
|
if (document.body.classList.contains('modal-open')) {
|
||||||
|
document.body.classList.remove('modal-open');
|
||||||
|
|
||||||
|
//Remove the padding-right and overflow:hidden from the body
|
||||||
|
document.body.style.paddingRight = '';
|
||||||
|
document.body.style.overflow = '';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue