Open
Description
Bug report
Summary
Alignment (left/right/center) doesn't work for images with captions (figure elements).
Step to reproduce
- Write a few paragraphs of text.
- Insert an image between the text and check the box to add a caption.
- Try switching left/right alignment (it works so far and the image floats to the left or right of the text).
- Switch to source mode and click save to get back to WYSIWYG mode (other actions like saving the page and reloading has the same effect).
- Re-select the figure resp. the figure caption and try again to switch left/right alignment a few times.
Observed behavior
Switching alignment has no effect. The image stays where it is and on top the element gets stuck with the CSS classes for both left and right alignment.
Simple images (img elements not inside a figure) work just fine.
Expected behavior
If I choose left alignment, the image floats to the left of the text. If I choose right alignment the image floats to the right of the text.
Environment
MODX version: 2.8.1-pl
Plugin version: 2.0.0-pl (version 1.3.4-pl had the same issue. Other versions I don't know.)
Browser: Chrome version 89.0.4389.90 (Official Build) (x86_64)