Closed (duplicate)
Project:
Drupal core
Version:
11.x-dev
Component:
ckeditor5.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Jan 2023 at 14:25 UTC
Updated:
5 Jul 2023 at 13:22 UTC
Jump to comment: Most recent
Comments
Comment #2
wim leersGreat catch!
Comment #3
wim leersAFAICT https://github.com/ckeditor/ckeditor5/issues/5154 would fix this, which would make it related to #3336446: EditorFileReference should compute a px <img height> if a % <img width> is specified, even though % <img width> is not allowed in HTML5.
Comment #4
wim leersOn second thought, this would actually mean that this is an upstream bug: it looks like CKEditor 5 blindly assumes that the
<figure>wrapping an<img>has the same width as the figure?!Assigning to @lauriii for confirmation.
Comment #5
lauriiiI was trying to point out a bug that is happening when the content is being processed into
\Drupal\filter\Render\FilteredMarkup. As part of that process,<figure>element is created in\Drupal\filter\Plugin\Filter\FilterCaption::processbased offdata-caption. It sounds like there are two separate bugs, one within CKEditor 5, and one that is related to\Drupal\filter\Plugin\Filter\FilterCaption.Comment #7
dabley commentedThis looks like a duplicate of #3348603: CKEditor 5 resizes images with % width instead of px width (the CKEditor 4 default): breaks image captions *and* is a regression.
Comment #8
wim leersWell, #3348603: CKEditor 5 resizes images with % width instead of px width (the CKEditor 4 default): breaks image captions *and* is a regression will fix it for all images as soon as they are resized again.
#3336446: EditorFileReference should compute a px <img height> if a % <img width> is specified, even though % <img width> is not allowed in HTML5 would still be appropriate hardening, but I agree there's nothing left to do here (besides, this really does belong in the
filter.modulecomponent, even though it's typically caused by CKEditor 5).Agreed with the course of action that @dabley proposed though, and crediting him for it! 😊🙏 One less issue!