Image Issue - Possibly a bug?


Sometimes, when I add an image with the image icon in redactor it will put the image at the bottom of the post, no matter where my cursor is within the post. I haven’t been able to reproduce the bug consistently, but it happens quite often, and even multiple times in a row.

Any idea if this is a configuration issue, or if this could be a bug with adding an image, or if it’s intended behavior in a certain “case”.

I’ve just tried this and it is putting it on the place of the cursor here.

Perhaps it’s losing the cursor position in some cases? Clicking outside the Redactor content (including on next to a button in the toolbar, or another field) can remove the focus and then it will default to a default position. Although in my test, that’s at the top and not at the bottom of the content.

Worth clarifying here, Redactor v2 or v3?

Hi Mark,

Sorry for the late reply. Work has been busy! I was having a hard time replicating the issue, but it seems that multiple people in the office were experiencing this bug which prompted me to dive deeper.

I had my boss (Mike) record a video to show you what is happening - and since I have been able to reproduce the bug (although not 100% of the time) in various MODX builds.

Here’s the video:

Here’s a list of builds we have been able to replicate this on:

  • MODX 2.7.1 without Content Blocks
  • MODX 2.7.3 with Content Blocks
  • MODX 2.7.3 default installation without extras besides Redactor (and default settings)

As well, we’ve been able to replicate this issue in Firefox, Safari and Chrome on both Windows and Mac. Our main goal here was to make sure that nothing else we have installed was conflicting with Redactor to cause the issue. It seems through our testing that it has to be a Redactor specific bug.

We have also tried it and successfully replicated the issue with the figure option in Redactor turned on and off, so it’s nothing to do with the wrapping of the figure element.

I do agree that it seems to lose focus and then place the image in a default location, although in our case that seems to be the bottom of the post.

Any thoughts, or ways to fix this? The main issue with the image being placed at the bottom is our posts tend to be thousands of words long, and it makes it quite difficult to place photos nicely into a post when they’re all placed at the bottom.

Thank you!