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

Freeze browser with SourceEditing plugin #360

Open
annikeChe opened this issue Mar 31, 2023 · 6 comments
Open

Freeze browser with SourceEditing plugin #360

annikeChe opened this issue Mar 31, 2023 · 6 comments

Comments

@annikeChe
Copy link

I use ckeditor5-angular with custom build configurations from official site customization with plugin SourceEditing.
I get browser freezing when trying to destroy component with SourceEditing active mode (e.g. call routing.navigate() or change *ngIf param)
I've got some example project for reproduce it.

Steps to reproduce:

  1. Click to "Source" button
  2. Write some text (important)
  3. Click the "Toggle" button.
  4. Get browser freezing

If you skip the (2) step all would be fine and browsers work great. Also, if you switch off source editing mode all would be fine too.
Also I found out that you will get the same behavior if you call some functions which affect editor.fire() function (e.g. editorInstance.getData()) in the (3) step.

I tried to reproduce this behavior without angular (only with ckEditor with SourceEditing plugin) and I haven't got this behavior, all worked fine.

I use this packages:

"@angular/core": "~13.3.0",
"@ckeditor/ckeditor5-angular": "5.2.0",
"@ckeditor/ckeditor5-build-classic": "36.0.1",
"@ckeditor/ckeditor5-source-editing": "36.0.1"

Full project example you can see here

@respectYourNeighbour
Copy link

Same issue! If you press the source button & edit some text, after pressing save, the browser crashes.

@Witoso
Copy link
Member

Witoso commented Jun 20, 2023

As reported in ckeditor/ckeditor5#11008

When I'm in SourceEditing mode, ngModel should be updated with click on button UPDATE SOURCE, but it isn't (Browser freeze)
Here is the link to the code: https://github.com/aljaznuncic/testCkeditor

@Mgsy
Copy link
Member

Mgsy commented Jul 12, 2023

As a workaround, you can switch to the editing mode after clicking your buttons, then call editor.getData().

For example:

sourceEditing: any;

toggleEditor() {
   this.sourceEditing = this.editor.plugins.get( 'SourceEditing' );
   this.sourceEditing.isSourceEditingMode = false;

   const data = this.editor.getData();

   this.showEditor = !this.showEditor;
}

@Witoso
Copy link
Member

Witoso commented Jul 12, 2023

I wonder if our fix in the main repo ckeditor/ckeditor5#14469 will not solve this problem! This was reported to React integration as well, was identified as an issue in the core, and fixed. Will be available, most likely in the next release!

@pomek
Copy link
Member

pomek commented Jul 21, 2023

Could we verify if the issue is solved using the nightly builds?

@annikeChe
Copy link
Author

annikeChe commented Aug 22, 2023

I've updated @ckeditor packages to these versions:

├── @ckeditor/[email protected]
├── @ckeditor/[email protected]
├── @types/[email protected]

and I still have this problem.
All changes commit into example repo.

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

No branches or pull requests

5 participants