Skip to content

bug(cdk-experimental:DIALOG): Config option disableClose does not work with openFromTemplate #18964

Closed

Description

@PierreDuc

Reproduction

While using the dialog to open a template by calling openFromTemplate, the disableClose is not respected. When you use a component by calling openFromComponent, the disableClose does work.

Most likely cause:

Inside _attachDialogContentForComponent there is a

dialogRef.disableClose = config.disableClose;

This is missing in the _attachDialogContentForTemplate

Expected Behavior

That the dialog doesn't close on Escape key if disableClose is true

Actual Behavior

It closes when it shouldn't :(

Environment

  • Angular: 9.1.0
  • CDK-experimental: 9.2.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Activity

  1. added
    needs triage
    on Apr 1, 2020
  2. self-assigned this
    on Apr 1, 2020
  3. added
    P3
    and removed
    needs triage
    on Apr 1, 2020
  4. added 2 commits that reference this issue on Apr 1, 2020
    9ad6e07
    122b20f
  5. PierreDuc commented on Apr 2, 2020

    @PierreDuc
    Author

    @crisbeto Nice fix, I like it :)

  6. added a commit that references this issue on Apr 6, 2020
    2c59b42
  7. added a commit that references this issue on Apr 14, 2020
    c0d19cb
  8. angular-automatic-lock-bot commented on May 7, 2020

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. locked and limited conversation to collaborators on May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions