mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Fixed #4589 - Improve block/unblockScroll architecture
This commit is contained in:
parent
b85876be95
commit
4fa7741923
9 changed files with 36 additions and 43 deletions
|
@ -50,8 +50,7 @@ export default {
|
|||
});
|
||||
|
||||
document.body.appendChild(this.mask);
|
||||
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
||||
document.body.style.setProperty('--scrollbar-width', DomHandler.calculateScrollbarWidth() + 'px');
|
||||
DomHandler.blockBodyScroll();
|
||||
document.activeElement.blur();
|
||||
} else {
|
||||
this.mask = DomHandler.createElement('div', {
|
||||
|
@ -92,8 +91,7 @@ export default {
|
|||
|
||||
if (this.fullScreen) {
|
||||
document.body.removeChild(this.mask);
|
||||
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
||||
document.body.style.removeProperty('--scrollbar-width');
|
||||
DomHandler.unblockBodyScroll();
|
||||
} else {
|
||||
this.$refs.container.removeChild(this.mask);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue