I Ran into this using the References Dialog and Media modules together with a basic installation of Drupal7.

When I go to create a new referenced entity, if that entity itself has a field from the Media module that will open a modal for creating a new media entity, that modal (which is in an iframe) is displayed beyond the bottom of the overlay.

Steps to reproduce:
1. Create an node type that references another type of node
2. Target node should have a field that uses the Media widget to select a file entity. This field should be configured to allow users to create a node of the child type from the target node's edit form.
3. Create a node of the parent type from step 1.
4. Click on "Create" link for the entity reference field, which brings up the child entity add form in an overlay.
5. Click on "Select Media" field.

Expected: select media popup is visible within the overlay.

Actual: select media popup is placed at the bottom of the overlay.

overlay displacement bug

When calculating the offset of the top region, it appears that jquery's selector traverses all the way back to the parent window of the iframe. Limiting the scope of that search using this selector in jquery appears to fix it without side effects. Attached is a patch with this fix.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

omerida’s picture

FileSize
521 bytes

Updated patch for latest stable release.

Status: Needs review » Needs work

The last submitted patch, overlay_displacement.patch, failed testing.