Skip to content

Commit

Permalink
fix(primeng/calendar): fix error in mode touchUI="true" and `inline…
Browse files Browse the repository at this point in the history
…="true"`

Fixes #11649.
  • Loading branch information
volvachev authored and Egor Volvachev committed Jun 25, 2022
1 parent 586ac0f commit ce97c0f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2461,7 +2461,7 @@ export class Calendar implements OnInit,OnDestroy,ControlValueAccessor {
}

enableModality(element) {
if (!this.mask) {
if (!this.mask && !this.touchUI) {
this.mask = document.createElement('div');
this.mask.style.zIndex = String(parseInt(element.style.zIndex) - 1);
let maskStyleClass = 'p-component-overlay p-datepicker-mask p-datepicker-mask-scrollblocker p-component-overlay p-component-overlay-enter';
Expand All @@ -2484,6 +2484,10 @@ export class Calendar implements OnInit,OnDestroy,ControlValueAccessor {
}

destroyMask() {
if (!this.mask) {
return;
}

document.body.removeChild(this.mask);
let bodyChildren = document.body.children;
let hasBlockerMasks: boolean;
Expand Down

0 comments on commit ce97c0f

Please sign in to comment.