ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Visual glitches while editing an image using CKBox

Open oleq opened this issue 10 months ago • 2 comments

📝 Provide detailed reproduction steps (if any)

https://github.com/ckeditor/ckeditor5/assets/1099479/78caf9aa-a9b3-4d3d-98e0-47df10cd8f4a

✔️ Expected result

  1. The loading spinner in CKBox staying centered.
  2. The image toolbar staying attached to the image after closing CKBox.

📃 Other details

  • Browser: Chrome
  • OS: MacOS

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

oleq avatar Apr 03 '24 09:04 oleq

I've investigated these problems a little.

  1. The spinner is probably only related to this one particular example. I guess there is a CSS conflict of some sort.
  2. The problem with the toolbar might be more broad. I tested some other demos with CKBox image editing enabled, and the results were the same. It may be related to the position: fixed property. When you turn it off on the CKBox dialog, the toolbar works correctly. It also fixes itself after some action on the page, like scrolling or clicking it. The toolbar is misplaced for 100px from the top.

Examples of other demos with the second problem:

  • https://ckeditor.com/docs/ckeditor5/latest/features/images/images-overview.html
  • https://ckeditor.com/docs/ckeditor5/latest/features/file-management/ckbox.html
  • https://ckeditor.com/docs/ckeditor5/latest/features/show-blocks.html

gorzelinski avatar Apr 05 '24 12:04 gorzelinski

2. The problem with the toolbar might be more broad. I tested some other demos with CKBox image editing enabled, and the results were the same. It may be related to the position: fixed property. When you turn it off on the CKBox dialog, the toolbar works correctly. It also fixes itself after some action on the page, like scrolling or clicking it. The toolbar is misplaced for 100px from the top.

We may want to call editor.ui.update() when CKBox closes. Various parts of the editor UI (including BalloonToolbar) react to that and re-position themselves.

oleq avatar May 07 '24 09:05 oleq