mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +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
|
@ -1656,8 +1656,7 @@ export default {
|
|||
this.mask.addEventListener('click', this.maskClickListener);
|
||||
|
||||
document.body.appendChild(this.mask);
|
||||
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
||||
document.body.style.setProperty('--scrollbar-width', DomHandler.calculateScrollbarWidth() + 'px');
|
||||
DomHandler.blockBodyScroll();
|
||||
}
|
||||
},
|
||||
disableModality() {
|
||||
|
@ -1691,8 +1690,7 @@ export default {
|
|||
}
|
||||
|
||||
if (!hasBlockerMasks) {
|
||||
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
||||
document.body.style.removeProperty('--scrollbar-width');
|
||||
DomHandler.unblockBodyScroll();
|
||||
}
|
||||
},
|
||||
updateCurrentMetaData() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue