Skip to content

Clicking any button inside modal will close it #35

@dkzeb

Description

@dkzeb

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

If the modal is configured to allow close (by escape, close button, etc ...) and a button is present in the component loaded into the modal - clicking this button will close the modal.

Expected behavior

I would expect the modal to not close when "in-modal" buttons are clicked

Minimal reproduction of the problem with instructions

  1. Create a component with a button an (click) handler
  2. Open the component using dialogService
  3. Click the in-component button
  4. Modal closes

What is the motivation / use case for changing the behavior?

We should be able to have buttons inside modals that do not close modals on click

Environment


Angular version: 12.0.2


Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: 14.15.4 
- Platform:  Windows 

Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions