Skip to main content
Question

The "documentchange" event does not fire on undo/redo if the instance's "name" property has been changed

  • February 16, 2023
  • 0 replies
  • 407 views

tank666

If you change the name of the instance by calling the rename function, the documentchange event will fire and indicate that the name property has been changed, but if you undo/redo, this event will not fire.

Steps to reproduce:

  1. Place an instance of any component on the canvas, or select an existing one.
  2. Run the plugin with the documentchange event listener.
figma.on(
    'documentchange',
    ({documentChanges}) => {
        console.log(documentChanges)
    }
);
  1. Change the name of the selected instance using Figma’s native rename function.
  2. Undo and redo the last action.

Expected result:
The documentchange event will fire and print an array of objects to the console.

Actual result:
The documentchange event does not fire.

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings