Support

Account

Home Forums Bug Reports acf-block-preview class applied when editing block fields

Unread

acf-block-preview class applied when editing block fields

  • I’m using ACF Pro 5.10.1 on WordPress 5.8.

    Here’s the issue I’m running into:

    1. Create a new page, and add a block that has ACF fields.
    2. Edit the block within the content editor, by clicking the pencil icon to switch out of preview mode.
    3. Save the page and exit the editor screen, leaving the block in edit mode (not preview).
    4. Reopen the page editor, and WordPress has remembered that the block was last in edit mode, so displays it in the editor that way.
    5. acf-block-preview class is applied around the ACF fields used for editing (it’s a default action on page load?).

    This can cause a few styling issues with CSS targeting acf-block-preview changing the look of the ACF fields, and possibly accidentally disabling them (eg. acf-block-preview a { pointer-events: none;}.

    Just a small thing, amazing how few issues ACF has had over the years!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.