-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
The default configuration options for ImageStyle
plugin are not properly cloned
#11328
Comments
A similar problem we had in the font-size feature: ckeditor5/packages/ckeditor5-font/src/fontsize/utils.js Lines 29 to 39 in f52226f
Scope:
|
We'd need a better description of what's wrong from the editor's perspective (in the editor's code). This is, extending this:
|
Actually, what's needed is – how to crash the editor without Angular. Naturally, Angular uses its API, but then how it uses its API to make it crash. |
I probably did not describe the problem precisely. The problem is not that the editor crashes. The problem is that if we have a context watchdog that watches over at least 2 editors, then an error in one of them causes that all of them are restarted (not as expected). The necessary condition for such incorrect reboots to take place is that each of these editors must have |
Fix (image): Always create new instances of the default options for the `ImageStyle` plugin. Closes #11328.
📝 Provide detailed reproduction steps (if any)
It's difficult for me right now to prepare a few short steps to reproduce this bug, so let me just describe the problem.
The problem occurred during updating CKE5-related dependencies in the
ckeditor5-angular
repository, because one test started to fail in this line: https://github.com/ckeditor/ckeditor5-angular/blob/master/src/ckeditor/ckeditor.component.spec.ts#L324.This test fails because unexpectedly the second component in this test also started to emit an error, but it shouldn't. The reason for this is that since CKE5 v29 we have an
ImageInline
plugin and the default options forImageStyle
have changed. It looks like they are not properly cloned when they are created, but they share the same arrays asmodelElements
in each editor, i.e.ckeditor5/packages/ckeditor5-image/src/imagestyle/utils.js
Line 47 in f52226f
✔️ Expected result
Editors do not share common properties.
❌ Actual result
Editors share common properties from
ImageStyle
plugin.❓ Possible solution
Make sure that default options are properly cloned.
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: