Окно подтверждения Kendo Angular UI Dialog не появляется после открытия другого всплывающего окна - PullRequest
0 голосов
/ 08 мая 2019

У меня есть диалоговое окно подтверждения Kendo-angular-ui, которое не отображается, когда перед ним открывается другой всплывающий элемент div.Работает нормально, если до этого не было ни одного всплывающего окна.

Всплывающий div, который не позволяет открывать диалоговое окно после его открытия

 <div id="myModal" class="popupModel" *ngIf="show">
    <!-- Modal content -->
    <div class="{{popupIdentifer.CssClass}}">
      <div class="popupModel-header">
        <span class="close" (click)="onClose()">&times;</span>
        <h2>{{popupIdentifer.Title}} <span *ngIf="popupIdentifer.Key == popupIdentifers.AddQuestion.Key">({{addQuestionCounter}})</span></h2>
      </div>
      <div class="popupModel-body">
        <topic-layout *ngIf="popupIdentifer.Key == popupIdentifers.Topic.Key" [programDetailID]="programDetailID" (topicRefresh)="topicRefresh($event)"></topic-layout>
        <audience-layout *ngIf="popupIdentifer.Key == popupIdentifers.Audience.Key" [programDetailID]="programDetailID" (audienceRefresh)="audienceRefresh($event)"></audience-layout>
        <add-question *ngIf="popupIdentifer.Key == popupIdentifers.AddQuestion.Key" (questionCounter)="questionCounter($event)" (close)="close($event)" [programDetailID]="programDetailID"></add-question>
      </div>

    </div>

  </div>

My Dialog Service

 public removeHandler({ dataItem }): void {
    const dialog: DialogRef = this.dialogService.open({
      title: "Primary Insights",
      content: "Are you sure you want to remove?",
      actions: [
        { text: "No" },
        { text: "Yes", primary: true }
      ],
      width: 520,
      minWidth: 250
    });

    dialog.result.subscribe((result) => {
      if ((result as any).text === "Yes") {
        const question: Question = dataItem;
        const index = this.questions.findIndex(({ questionID }) => questionID === question.questionID);
        question.isDeleted = true;
        this.questionService.update(question).subscribe(
          result => {
            if (result.success) {
              this.questions.splice(index, 1);
              this.loadItems();
              this.showAlert("Success! User has been successfully removed.", "success");
            }
            else {
              //this.openDialog("Error", result.message);
              this.showAlert("Oops! There is some issue!! Please try again.", "error");
            }
          });
      }
    });

  }
...