mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #882 - Dialog component scrollbar shift
This commit is contained in:
parent
e0fe133189
commit
e204de32f4
2 changed files with 3 additions and 0 deletions
|
@ -213,11 +213,13 @@ export default {
|
|||
enableDocumentSettings() {
|
||||
if (this.modal || (!this.modal && this.blockScroll) || (this.maximizable && this.maximized)) {
|
||||
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
||||
document.body.style.setProperty('--scrollbar-width', DomHandler.calculateScrollbarWidth() + 'px');
|
||||
}
|
||||
},
|
||||
unbindDocumentState() {
|
||||
if (this.modal || (!this.modal && this.blockScroll) || (this.maximizable && this.maximized)) {
|
||||
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
||||
document.body.style.removeProperty('--scrollbar-width');
|
||||
}
|
||||
},
|
||||
onKeyDown(event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue