Adding a caption to an image adds a width: 100% css attribute and stretches the image.
System Information:
* Joomla! 4.2.6 Stable
* JCE 2.9.32 & 2.9.33-rc4
* Template: Cassiopeia
To reproduce:
1. Create an article
2. Add images
3. Save the article - everything fine
4. Add a caption to an image
5. Save the article
6. See that the image with the caption added being oversized and stretch over the whole article width as a width: 100% got added
Two indentical pictures in one article, the first one untouched, the second one with a caption added have the following code:
<img src="https://www.joomlacontenteditor.net/files/images/bug_caption.png" alt="bug caption" style="margin: 5px 20px;">
<img src="https://www.joomlacontenteditor.net/files/images/bug_caption.png" alt="bug caption" style="margin: initial; float: none; width: 100%;">
Whole article code:
<p><img src="https://www.joomlacontenteditor.net/files/images/bug_caption.png" alt="bug caption" style="margin: 5px 20px;"></p>
<p><span class="wf_caption" style="margin: 5px 20px; display: inline-block; width: 100%;" role="figure"><img src="https://www.joomlacontenteditor.net/files/images/bug_caption.png" alt="bug caption" style="margin: initial; float: none; width: 100%;"><span style="text-align: left; display: block;">bug caption</span></span></p>
Attached are images to illustrate the steps taken to reproduce.