pull/411/head
cagataycivici 2020-07-24 12:32:10 +03:00
commit 0be8672835
3 changed files with 40 additions and 24 deletions

View File

@ -111,7 +111,7 @@ export default {
position: fixed; position: fixed;
} }
.p-blockui-leave.p-component-overlay { .p-blockui.p-blockui-leave.p-component-overlay {
background-color: transparent; background-color: transparent;
} }
</style> </style>

View File

@ -1258,7 +1258,7 @@ export default {
if (!this.mask) { if (!this.mask) {
this.mask = document.createElement('div'); this.mask = document.createElement('div');
this.mask.style.zIndex = String(parseInt(this.$refs.overlay.style.zIndex, 10) - 1); this.mask.style.zIndex = String(parseInt(this.$refs.overlay.style.zIndex, 10) - 1);
DomHandler.addMultipleClasses(this.mask, 'p-component-overlay p-datepicker-mask p-datepicker-mask-scrollblocker'); DomHandler.addMultipleClasses(this.mask, 'p-datepicker-mask p-datepicker-mask-scrollblocker');
this.maskClickListener = () => { this.maskClickListener = () => {
this.disableModality(); this.disableModality();
@ -1267,10 +1267,18 @@ export default {
document.body.appendChild(this.mask); document.body.appendChild(this.mask);
DomHandler.addClass(document.body, 'p-overflow-hidden'); DomHandler.addClass(document.body, 'p-overflow-hidden');
setTimeout(() => {
DomHandler.addClass(this.mask, 'p-component-overlay');
}, 1);
} }
}, },
disableModality() { disableModality() {
if (this.mask) { if (this.mask) {
this.overlayVisible = false;
DomHandler.addClass(this.mask, 'p-datepicker-mask-leave');
this.mask.addEventListener('transitionend', () => {
this.mask.removeEventListener('click', this.maskClickListener); this.mask.removeEventListener('click', this.maskClickListener);
this.maskClickListener = null; this.maskClickListener = null;
document.body.removeChild(this.mask); document.body.removeChild(this.mask);
@ -1289,8 +1297,7 @@ export default {
if (!hasBlockerMasks) { if (!hasBlockerMasks) {
DomHandler.removeClass(document.body, 'p-overflow-hidden'); DomHandler.removeClass(document.body, 'p-overflow-hidden');
} }
});
this.overlayVisible = false;
} }
}, },
updateCurrentMetaData() { updateCurrentMetaData() {
@ -2291,4 +2298,13 @@ export default {
min-width: 80vw; min-width: 80vw;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.p-datepicker-mask {
background-color: transparent;
transition-property: background-color;
}
.p-datepicker-mask.p-datepicker-mask-leave.p-component-overlay {
background-color: transparent;
}
</style> </style>

View File

@ -166,7 +166,7 @@ export default {
transition-property: background-color; transition-property: background-color;
} }
.p-sidebar-mask-leave.p-component-overlay { .p-sidebar-mask.p-sidebar-mask-leave.p-component-overlay {
background-color: transparent; background-color: transparent;
} }