This commit is contained in:
mertsincan 2023-09-25 11:05:27 +01:00
parent e204de32f4
commit 5e53cef422
11 changed files with 38 additions and 11 deletions

View file

@ -36,6 +36,7 @@ export default {
beforeUnmount() {
if (this.fullScreen) {
DomHandler.removeClass(document.body, 'p-overflow-hidden');
document.body.style.removeProperty('--scrollbar-width');
}
this.mask = null;
@ -52,6 +53,7 @@ export default {
onEnter(el) {
this.mask.style.zIndex = String(parseInt(el.style.zIndex, 10) - 1);
DomHandler.addClass(document.body, 'p-overflow-hidden');
document.body.style.setProperty('--scrollbar-width', DomHandler.calculateScrollbarWidth() + 'px');
this.focus();
},
onBeforeLeave() {
@ -61,6 +63,7 @@ export default {
ZIndexUtils.clear(el);
this.containerVisible = false;
DomHandler.removeClass(document.body, 'p-overflow-hidden');
document.body.style.removeProperty('--scrollbar-width');
},
onActiveItemChange(index) {
if (this.activeIndex !== index) {