Skip to content

Dropdown options in dialogs are not visible when the editor is in a fixed container (e.g. a modal) #4281

@mehmetseckin

Description

@mehmetseckin

We're using TinyMCE in a modal dialog, and we have to use the ui_container in order to keep floatpanels in place (see #3592).

TinyMCE appends the "dialogs" (such as "Insert Link") to document.body, disregarding the ui_container setting, while the floatpanels like dropdown options are still being appended to the specified ui_container. This causes the floatpanels like dropdown options inside TinyMCE dialogs to fall behind the dialog window as seen below.

image

I've tracked this down to the following line; the dialogs are rendered into document.body:

win = win.renderTo(document.body).reflow();

Here is a codepen that reproduces this behaviour

Also, if we don't use ui_container, the dropdown options are positioned incorrectly depending on the scroll position:

At the top of the window (good behaviour):
image

Scrolled down a bit, and then clicked the target dropdown (incorrectly positioned options):
image

Any ideas how to get around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions