Content embed via another modal (Media Library) pushed embed button beyond viewport

Created on 16 May 2025, 2 months ago

Hello,

My understanding is that this module uses a patch from core ( https://www.drupal.org/project/drupal/issues/2741877 🐛 Nested modals don't work: opening a modal from a modal closes the original Needs work ) to allow for nested modals (modals in modals).

This works perfectly in our case with custom Embedded content, with one exception.

When content coming from a nested modal (in this case the addition of an image via the media library) exceeds the viewport height of the WYSIWYG editor, it doesn't fire a resize on the modal. This makes the 'Embed' button impossible to reach without manual manipulation of the top positioning inline style.

It should be noted that when I enter text only based content (for example), into the WYSIWYG body, it correctly extends the modal to fill the vertical height of the viewport, then provides internal scrolling. If I embed the content, then return to edit it, the embed button is still off screen but if I manually trigger a resize event (change viewport size/open dev tools etc) it fixes the modal (provides internal scrolling).

Apologies for the long winded post, I'm not 100% sure if this is more of a core related bug or not.

Happy to provide anything further to assist/explain better!

🐛 Bug report
Status

Active

Version

2.0

Component

User interface

Created by

🇳🇿New Zealand chroid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024