When the Layout Builder Modal is open and you resize the window, the modal's position changes to top right.
Window Resize

CommentFileSizeAuthor
Aug-12-2019 08-55-28.gif11.16 MBkevinfunk

Comments

kevinfunk created an issue. See original summary.

johnwebdev’s picture

Hi, and thanks for reporting the issue!

It looks like the issue here is that both the off canvas and the dialog is rendered at the same time. We can also reproduce this without Layout Builder and Layout Builder Modal.

            <a href="/node/add/page" class="use-ajax" data-dialog-options='{"width": 500,"modal": true,"autoResize":true}' data-dialog-type="dialog">Dialog</a>
            <a href="/node" class="use-ajax" data-dialog-renderer="off_canvas" data-dialog-type="dialog">Off canvas</a>

If you only would open the Dialog, it would resize and the position would be as expected. But if you first open the off canvas, and then the dialog the same behaviour as with Layout Builder Modal.

I am thinking this is a Drupal core bug.

johnwebdev’s picture

kevinfunk’s picture

Thanks @johndevman for creating the core issue.

johnwebdev’s picture

Status: Active » Postponed

Postponing on core issue.