Unexpected Behavior with DocumentChangeEvent

Hey everyone,

I’m currently working on a Figma plugin that involves Styles, and I’ve come across an unexpected behavior with the DocumentChangeEvent:

I noticed that when a user opens the “+” pop-up in Local Styles to create a new style, clicking on any style type triggers the DocumentChangeEvent with all three possible style changes (create, delete, property change) at once. However, at this point, nothing is actually created, deleted, or modified, so the user is notified about changes that didn’t happen.

Is there a way to work around it? I want to avoid notifying users about changes that haven’t taken place yet.

Thanks in advance.

Hey @JR13, thank you for flagging this! We’ve forwarded this internally, so this is being looked at.

1 Like