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

DOC-2498: Closing a nested modal dialog would lose focus from the editor. #3482

Open
wants to merge 1 commit into
base: feature/7.5/DOC-2498
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions modules/ROOT/pages/7.5-release-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a

// CCFR here.

=== Closing a nested modal dialog would lose focus from the editor.
// #TINY-11153

When closing dialogs in an inline editor, focus was unintentionally lost before the dialog was fully closed. This issue was linked to link:https://www.tiny.cloud/docs/tinymce/6/6.5.1-release-notes/#closing-a-dialog-would-scroll-down-the-document-in-safari-on-macos[Closing a dialog would scroll down the document in Safari on macOS^] which was fixed in {productname} 6.5.1, where dismissing the Search/Replace dialog by clicking outside of it in Safari on macOS caused the document to scroll unexpectedly.

As a consequence of this linked issue, the loss of focus led to the editor entirely losing its focus, resulting in the inline editor hiding its UI. This behavior created confusion, as the preceding dialog (e.g., table properties) appeared to close unexpectedly.

The implemented fix ensures that focus is only shifted away from the dialog if it is currently focused. As a result, the editor retains its UI when closing nested dialogs.
Comment on lines +164 to +168
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on the docs as always. I have a few suggestions to make:

Based on my understanding, this issue was not exclusive to inline editors (the title of the JIRA ticket is slightly inaccurate). It still happens in classic mode, but the difference is that inline mode not only loses focus of the dialog, but also hides the UI since it is no longer in focus. So I think we can generalise it to include all editors.

Additionally, I would like to suggest that it's also not necessary to mention the linked issue because it may be more confusing that helpful. Personally I would just focus on the relevant part for the readers which is what the issue was, how it impacted them, and how it's solved.

Feel free to disagree or ask me to edit change my suggestions :)

Suggested change
When closing dialogs in an inline editor, focus was unintentionally lost before the dialog was fully closed. This issue was linked to link:https://www.tiny.cloud/docs/tinymce/6/6.5.1-release-notes/#closing-a-dialog-would-scroll-down-the-document-in-safari-on-macos[Closing a dialog would scroll down the document in Safari on macOS^] which was fixed in {productname} 6.5.1, where dismissing the Search/Replace dialog by clicking outside of it in Safari on macOS caused the document to scroll unexpectedly.
As a consequence of this linked issue, the loss of focus led to the editor entirely losing its focus, resulting in the inline editor hiding its UI. This behavior created confusion, as the preceding dialog (e.g., table properties) appeared to close unexpectedly.
The implemented fix ensures that focus is only shifted away from the dialog if it is currently focused. As a result, the editor retains its UI when closing nested dialogs.
Previously in {productname}, closing a nested dialog (such as the color picker dialog within the Table Properties dialog) would cause the editor to lose focus on the parent dialog and shift focus to the editor content in the background.
This issue impacted keyboard users, preventing them from navigating or closing the parent dialog since the focus was no longer on the dialog. Additionally, in inline mode editors, the dialog UI would disappear entirely when focus shifted to the editor area, giving the impression that the dialog had closed unexpectedly.
This issue has been resolved by ensuring focus returns to the parent dialog when a nested dialog is closed. As a result, keyboard users can now navigate and close dialogs as expected, and the dialog UI remains visible in inline mode editors.


[[security-fixes]]
== Security fixes
Expand Down
Loading