The preview modal does not seem to load the required js and css to work properly. I think this is caused by manually rendering the output in the FocalPointPreviewController. Instead of passing a rendered html string to the OpenModalDialogCommand, the renderable array can be passed as-is. This allows the attached js and css to be also passed in with the ajax-responses.
I'll add a patch that replaces manually rendering the content with passing the renderable array directly.

| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Screen Shot 2020-08-28 at 4.22.21 PM.png | 519.16 KB | bleen |
| #5 | 3126288-5.patch | 2.41 KB | bleen |
| #4 | Edit-image.png | 18.12 KB | spadxiii |
| #4 | Preview-image.png | 51.5 KB | spadxiii |
| #2 | 3126288-2.patch | 2.29 KB | spadxiii |
Comments
Comment #2
spadxiii commentedComment #3
bleen commentedcan you post steps to reproduce the problem? what are we seeing that we shouldn't (or what aren't we seeing that we should)?
Comment #4
spadxiii commentedThe steps I've taken is uploading an image:

While editing the media item, I click the preview-link underneath the image. The resulting modal does not seem to work:

From what I could see is that because the preview-modal html is rendered manually, the attached js/css is not passed on to the browser.
The ajax-request does not receive a full html-page, but only the contents div.
ps. I didn't see any conflicting code or twig templates from the admin-theme we use.
Comment #5
bleen commentedI forgot about this issue and then started working on the duplicate issue here: #3162218: Fix Images preview style is not attached in the page
Came to the EXACT same patch as the one here (except that this patch removed some cruft as well). Here is the patch I will go with
Comment #6
bleen commentedscreen shot of this working ... for ref
Comment #8
bleen commentedCommitted!