AdvancedCustomFields / AdvancedCustomFields/acf

acf-block-preview class missing when block is initially loaded in edit mode.

Open
#620 14 comments 1 reaction 1 assignee View on GitHub

@lgladdy is already working on this.

Since Mar 8, 2022.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

Since the latest update, we're having an issue with the ACF block preview mode. By default, ACF adds .acf-block-preview to each block when in preview mode, and we use that class to ensure our CSS doesn't effect the edit mode fields. However the class doesn't always seem to be there.

Steps to reproduce:

  1. Add an ACF block to a post
  2. Switch the block to Edit mode and save the post.
  3. Refresh the page and then go back to the to the block and toggle to Preview mode - you'll notice the .acf-block-preview class is not there in this instance.

It appears that if blocks are initialised in Preview mode then the class is there, but if they are initialised in Edit mode and then toggled, the class does not show.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.