• Resolved yepecece

    (@yepecece)


    Hi,

    I am using your great plugin and I found a bug.

    Since I am using the acf medium editor field (https://ww.wp.xz.cn/plugins/acf-medium-editor-field/) which somehow does not work with your “Layouts Modal: Edition” mode (maybe because of z-index) I need to disable it.

    However, for some reason, when modal is disabled, the “Dynamic Preview” mode only works on load and when manually collapsing the flexible field. If I edit another layout, it does not return to collapsed/preview mode.

    I also tried to set the “Force State” setting to collapsed.

    Let me know if this makes sense or if you need more info.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback! I never used the medium editor, I just tested it, and yeah there’s a z-index problem with the toolbar when used in an ACFE modal. I’ll include a fix in the patch. Meanwhile you can patch it yourself with the following code:

    
    add_action('acf/input/admin_head', 'my_acf_admin_head');
    function my_acf_admin_head(){
        ?>
        <style type="text/css">
            body .medium-editor-toolbar {
                z-index: 999999 !important;
            }
        </style>
        <?php
    }
    

    Concerning the “Dynamic Preview”, the feature is working as intended. You have to manually collapse/close the layout in order to refresh the “Dynamic Preview”. When using the “Modal Edit” setting, the Preview is refreshed when closing the modal.

    See the YouTube introduction video: https://www.youtube.com/watch?v=hzkNL0BA3Dk

    What you’re asking is to automatically collapse/close a layout if the user open on an another layout. But that could lead to some problems as layout fields can be bigger than the actual Preview (when there are many fields).

    If the user open an another layout, the first layout get closed, which will resize the screen (if the Preview is smaller than the fields edit mode). The user may get lost in the process and not understand why the page has moved. The newly opened layout could also possibly move and get out of the user screen.

    This could be fixed by calculating and moving the screen to the correct new layout. I add the feature request to the Trello Board: https://trello.com/c/k58wDoJW/257-flexible-content-allow-only-one-opened-layout-at-the-same-time-openning-a-new-layout-collapse-all-others

    Have a nice day!

    Regards.

    Thread Starter yepecece

    (@yepecece)

    Thanks for the quick reply.

    I now understand your logic.
    Maybe you could disable the “Layouts: Force State” option when “Layouts: Dynamic Preview” is enabled.

    Thanks.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    The “Layouts: Force State” setting is used during admin page load, and let you force a specific state for the layouts. If you leave it to “Default”, then it will fallback to the native ACF behavior: The browser will remember which layouts were left opened or closed by the user.

    Some people want to force layouts as opened and others want to force them closed (in preview mode, for example). I don’t understand why I should remove this setting?

    Regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Bug with Dynamic Preview without modal’ is closed to new replies.