Skip to content

Commit

Permalink
Merge pull request #11653 from volvachev/fix-calendar-touch-ui
Browse files Browse the repository at this point in the history
fix(primeng/calendar): fix error in mode `touchUI="true"` and `inline="true"`
  • Loading branch information
cetincakiroglu authored Aug 9, 2022
2 parents eb04fc6 + ce97c0f commit 1a0cebf
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 1a0cebf

Please sign in to comment.