ACF FocusPoint Block Editor Fix
Restores click-to-set on the ACF FocusPoint field inside the modern (iframed) WordPress block editor.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/kenlstark/acffp-click-fix/archive/refs/heads/main.zipReadme
ACF FocusPoint Block Editor Fix
Restores click-to-set on the Advanced Custom Fields: FocusPoint field inside the modern (iframed) WordPress block editor.
The problem
The FocusPoint plugin hasn't been updated in years. In the modern block editor, WordPress renders block edit forms in an iframed / re-rendered context, and FocusPoint's picker stops responding: clicking the image no longer moves the focus indicator, so editors can't set a focal point.
The cause is how FocusPoint wires up its interaction. It binds a click handler once, at field init, directly to the picker element. Because the block editor re-renders the field after that runs, the element you actually click never receives a handler.
The fix
This companion plugin attaches a single delegated click listener on document, so it fires no matter when or where the field is rendered: block editor sidebar/modal, classic edit screens, options pages, and repeaters. It:
- makes no changes to the original plugin, your stored data, or your field configuration;
- loads its script only on screens where the FocusPoint field is present;
- coexists safely with FocusPoint's original handler on screens where that still works (both compute the same value, so it's idempotent).
Requirements
- WordPress 5.9+
- PHP 7.0+
- The Advanced Custom Fields: FocusPoint plugin, installed and active. This plugin does nothing on its own.
Installation
- Copy the
acffp-click-fixfolder intowp-content/plugins/, or upload the ZIP via Plugins → Add New → Upload Plugin. - Activate ACF FocusPoint Block Editor Fix under Plugins.
- Edit any post/page with a FocusPoint field and confirm the focus indicator moves when you click the image.
How it works
On acf/input/admin_enqueue_scripts, the plugin checks whether FocusPoint's own script (handle acffp) is enqueued and, if so, enqueues a small script that listens for clicks on .focuspoint-selection-layer, calculates the focal point from the click position, moves the .focal-point-picker indicator, and writes the values back to the field's hidden inputs (triggering change via jQuery so ACF flags the field/block dirty).
Notes
The delegated listener is bound to the top-level document, which covers the block editor sidebar/modal and all classic admin screens. If a site renders the FocusPoint field inside the block editor canvas iframe itself, an additional in-iframe binding would be required.