Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal dialog closing when you click outside #567

Closed
jamesrwelch opened this issue Jun 21, 2022 · 1 comment · Fixed by #568
Closed

Modal dialog closing when you click outside #567

jamesrwelch opened this issue Jun 21, 2022 · 1 comment · Fixed by #568
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jamesrwelch
Copy link
Contributor

Dialog boxes close when you click in the surrounding area. If you've already added some text, then that gets lost.

  1. Go to a draft terminology and the lost of terms
  2. Click "Add terms"
  3. Add some text - code, definition, description
  4. Click outside the modal window
  5. Text is now missing - it also doesn't reappear when you reopen the dialog.

One solution would be to pop up the confirmation dialog when you click outside a modal window. Another might be to stop the form closing when you click outside.

@jamesrwelch jamesrwelch added the enhancement New feature or request label Jun 21, 2022
@pjmonks
Copy link
Contributor

pjmonks commented Jun 21, 2022

A MatDialog has the option to close the dialog when clicking on the overlay container (the darkened area around the dialog window). Sometimes this is useful, such as when wanting to not confirm (cancel) an action by default, but clearly in some cases it isn't desirable.

In scenarios like this where it is not wanted, it is simple to switch off via MatDialog options, but only at the call site where used.

@pjmonks pjmonks self-assigned this Jun 21, 2022
pjmonks added a commit that referenced this issue Jun 22, 2022
Any dialog that could potentially lose user input data is now wrapped around the EditingService to ask the user to confirm closing the dialog if they click in the overlay container/background
pjmonks added a commit that referenced this issue Jun 22, 2022
pjmonks added a commit that referenced this issue Jul 18, 2022
* Added necessary unsubscribe logic back to versioned folder
* Removed unecessary unsubscribe logic from folder
jamesrwelch added a commit that referenced this issue Jul 19, 2022
#567 - Confirm closing of certain dialogs when clicking in the overlay area
@pjmonks pjmonks added this to the 7.2.0 milestone Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

2 participants