Fixed #4463 - Dialog: new blockScroll property

This commit is contained in:
Tuğçe Küçükoğlu 2023-09-18 12:14:52 +03:00
parent aa34254aa7
commit d9aeaec5e7
4 changed files with 17 additions and 2 deletions

View file

@ -208,12 +208,12 @@ export default {
}
},
enableDocumentSettings() {
if (this.modal || (this.maximizable && this.maximized)) {
if (this.modal || (!this.modal && this.blockScroll) || (this.maximizable && this.maximized)) {
DomHandler.addClass(document.body, 'p-overflow-hidden');
}
},
unbindDocumentState() {
if (this.modal || (this.maximizable && this.maximized)) {
if (this.modal || (!this.modal && this.blockScroll) || (this.maximizable && this.maximized)) {
DomHandler.removeClass(document.body, 'p-overflow-hidden');
}
},