Skip to content

Conversation

@carla-at-wiris
Copy link
Contributor

@carla-at-wiris carla-at-wiris commented Dec 23, 2025

Description

When multiple CKEditor instances are rendered within a single CKEditor context, opening the MathType popup from any editor and then clicking Cancel does not restore focus to the editor that opened the dialog.

Instead, focus is transferred to a different editor, typically the one from which MathType was previously opened.

This PR fixes the issue by recalculating the current instance when opening an existing formula.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project ( Run yarn lint to check)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • New and existing unit tests pass locally with my changes

How should be tested? (Manual or Automated Tests)

  • Modify the CKEditor5 demo to add multiple instances
    • Copy the code from line 30 to line 68 on the file demos/html/ckeditor5/src/app.js.
    • Paste it after line 68. Paste as many as editors you want.
    • Change the ID on the first line to uniquely identify the editor.
  • Modify the HTML code to include the new editors
    • Copy the code from line 12 to line 14 on the file packages/res/demos/index.html.
    • Paste it after line 14. As many as editors you want
    • Change the div ID to match the ID's you created for the CKEditor's before
  • Now that the demo is ready, le'ts build and start it:
    • Clean all dependencies with git clean -dfx
    • Install the dependencies with yarn
    • Build the CKEditor package with nx build ckeditor5
    • Start the ckeditor demo with nx start html-ckeditor5

@carla-at-wiris carla-at-wiris self-assigned this Dec 23, 2025
@carla-at-wiris carla-at-wiris changed the base branch from release/v8.14.1 to master December 23, 2025 12:18
Copy link
Contributor

@ncornaglia-at-wiris ncornaglia-at-wiris left a comment

Choose a reason for hiding this comment

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

Pues doy el aprobado y rezo que nose rompa nada extra

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants