Skip to content

Conversation

@andywarren
Copy link

When GiveWP’s Sequoia template runs inside an iframe on sites built with WP Bakery, the iframe isn’t wrapped in a Gutenberg .wp-block, so the block selection click handler throws. This PR adds safe checks for the frame element, .closest, and a valid data-block before dispatching block selection. That prevents errors in non-Gutenberg contexts while preserving the editor behavior when the block exists.

Affects
Sequoia template editor click handling for block selection in form.js.

Testing Instructions
Load a Sequoia form inside the block editor; click inside the form and confirm the block still selects.
Load the form on a WP Bakery page (no .wp-block ancestor) and confirm no JS errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants