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

inert attribute not being removed when calling editorService.closeAll() #10708

Closed
mattbrailsford opened this issue Jul 19, 2021 · 2 comments
Closed

Comments

@mattbrailsford
Copy link
Contributor

mattbrailsford commented Jul 19, 2021

Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8

8.14 + 8.15

Bug summary

#8522 introduced the adding of an inert attribute on the main editor window when opening a dialog however this isn't getting removed when calling editorService.closeAll() and so the editor becomes completely unresponsive.

Specifics

We are receiving reports from Vendr users who have upgraded to 8.14+ that when they use the discounts editor (which opens in a dialog), when they close the editor dialog, the whole editor becomes unresponsive.

On investigation, this appears to come down to the fact that in #8522 a new attribute is added to the main editor window, "inert" which is styled such that it blocks all pointer events, preventing clicks on the background window while the dialog is open. It appears that most of the work with this attribute is concentrated around the dialog service, and when you call close on this service, the attribute is removed.

Unfortunately, this doesn't appear to take into account that a dialog can be controlled via the editor service too, which is what our dialog is using such that on completion the dialog calls editorService.closeAll() however this doesn't appear to be removing the inert attribute and so the main editor window remains unresponsive.

Steps to reproduce

  1. Launch a dialog via the editor service editorService.open(...);
  2. Close the dialog calling editorService.closeAll()
  3. Editor becomes completely unresponsive

Expected result / actual result

inert attribute should be removed when dialog is closed and main editor should become responsive again.

@nul800sebastiaan
Copy link
Member

Thanks @mattbrailsford for the fix! And apologies for breaking this scenario for you!

nul800sebastiaan pushed a commit that referenced this issue Jul 22, 2021
Fixes #10708 by removing the `inert` attribute on `#mainWrapper` when `editorService.closeAll()` is called.

This code is necessary because when close all is called, there is no editor passed, and so `removeEditor` is never called, and so the `focusLockService.removeInertAttribute();` method isn't called. I add to the if block that handles the close all code instead.

(cherry picked from commit 1f4cc81)
@nul800sebastiaan
Copy link
Member

nul800sebastiaan commented Jul 22, 2021

Fixed in PR #10710 and cherry picked for 8.14.2 in 98266d4 (will also be available in 8.15.1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants