{{ message }}
Repository navigation
fix: swap animation classes inside the iframed editor canvas - #22
Merged
RahatSheikhLeon merged 1 commit intoOct 29, 2026
Merged
RahatSheikhLeon merged 1 commit into
RahatSheikhLeon merged 1 commit into
Conversation
The admin change handler only queried the outer admin document, but blocks render in iframe[name="editor-canvas"], so picking an animation updated nothing. Also query the canvas document and measure the viewport against the element's own window. Same change as accordion-toggle (fixes accordion-toggle#41). The script shares the essential-blocks-eb-animation handle and the first plugin to register it wins, so every copy needs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Follow-up to #18. Base is
fix/animation-mutation-event, so merging this updates #18.#18 makes the admin
changehandler work again, but it only looks in the outer admin document. Blocks render inside theeditor-canvasiframe, so picking an animation in the inspector still does not update the block there.Change
eb-animation-load.js: the handler runs for the admin document and the editor-canvas iframe document (getEditorDocuments()), andisInViewportmeasures against the element's own window.essential-blocks-eb-animationhandle and the first one registered wins, so all copies need the same code; otherwise accordion's fix is lost whenever another EB plugin is active.Testing
node --checkpasses.eb___→eb__class swap happens on the admin page and inside the canvas iframe.Follow-up (not in this PR)
For the animation to play in the canvas,
animate.min.cssalso has to load in the canvas, as accordion'sblock_canvas_assets()does.🤖 Generated with Claude Code