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.

Comments

SpadXIII created an issue. See original summary.

spadxiii’s picture

Status: Active » Needs review
StatusFileSize
new2.29 KB
bleen’s picture

can you post steps to reproduce the problem? what are we seeing that we shouldn't (or what aren't we seeing that we should)?

spadxiii’s picture

StatusFileSize
new51.5 KB
new18.12 KB

The steps I've taken is uploading an image:
Editing image

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

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.

bleen’s picture

StatusFileSize
new2.41 KB

I 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

bleen’s picture

Issue summary: View changes
StatusFileSize
new519.16 KB

screen shot of this working ... for ref

  • bleen committed 6d86824 on 8.x-1.x authored by SpadXIII
    Issue #3126288 by SpadXIII, bleen: Preview modal does not load js/css
    
bleen’s picture

Status: Needs review » Fixed

Committed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.