Skip to content

fix: prevent trigger events from becoming undeletable - #484

Merged
tristan-mouchet merged 1 commit into
developfrom
fix/interaction-delete-blocked-by-preview-cleanup
Aug 3, 2026
Merged

fix: prevent trigger events from becoming undeletable#484
tristan-mouchet merged 1 commit into
developfrom
fix/interaction-delete-blocked-by-preview-cleanup

Conversation

@tristan-mouchet

Copy link
Copy Markdown
Collaborator

Summary

Fixes a bug where a trigger event could not be deleted once it had an animated property. Deleting worked fine until a property was added, then the delete did nothing while the rest of the editor stayed responsive.

The event remove handler ran GSAP/iframe preview cleanup synchronously before the actual removal, and that cleanup block only executes when the event has animated properties. If any cleanup call threw in a given environment, the exception aborted the handler before the delete ran, so the event was never removed. This regression was introduced with the background-color animation feature.

Changes

  • Wrap preview cleanup in try/catch in the interaction, tween, and property remove handlers so cosmetic cleanup can never block the actual removal
  • Log a warning instead of throwing when cleanup fails

Test plan

  • Add a trigger event with an animation and an animated property, then delete the event via the X — it should be removed
  • Delete an animation and an animated property individually — still works
  • Delete an event with no animated properties — still works
  • Confirm no leftover inline styles remain on the canvas after deletion in the normal (non-error) path

Deleting a trigger event with animated properties could silently fail:
preview cleanup ran synchronously before the removal, so a GSAP/iframe
error aborted the handler before the delete. Wrap cleanup in try/catch
in the interaction, tween, and property remove handlers so cosmetic
cleanup can never block the actual removal.
@tristan-mouchet tristan-mouchet added the Bug Something isn't working label Aug 3, 2026
@tristan-mouchet tristan-mouchet self-assigned this Aug 3, 2026
@tristan-mouchet
tristan-mouchet merged commit 2ed0f6d into develop Aug 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant