Closed milo526 closed 1 year ago
Run & review this pull request in StackBlitz Codeflow.
The changes as suggested work for our use case.
The injection of the dialog service into the dialog component feels a bit hacky.
I was doubting if these tests are in the right place; I'd rather have some more integrated tests opening multiple dialogs through the service and seeing if the correct dialogs close. However, this did not seem to be the style of the tests you are targeting.
I would love some feedback on this PR.
Thank you for the feedback. The PR has been updated accordingly.
Closes #96
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
In situations where there are multiple opened modals that are stacked over each other; closing with Escape results in all of the modals being closed. Clicking the backdrop only dismisses the top modal.
Issue Number: #96
What is the new behavior?
With the
enableClose
config value set toonlyForLastOpenedDialog
, pressing escape will only dismiss the last opened dialog instead of all open dialogs.Does this PR introduce a breaking change?
Other information